Просмотр исходного кода

Merge remote-tracking branch 'origin/sheep2.0' into sheep2.0

# Conflicts:
#	app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java
#	gradle.properties
liujiangyao лет назад: 7
Родитель
Сommit
664bad1909
69 измененных файлов с 3443 добавлено и 320 удалено
  1. 6 0
      app/src/main/AndroidManifest.xml
  2. 33 16
      app/src/main/java/com/kfzs/duanduan/fragment/FgtFind.java
  3. 195 31
      app/src/main/java/com/kfzs/duanduan/fragment/FgtFindChild.java
  4. 4 1
      app/src/main/java/com/kfzs/duanduan/fragment/FgtPersonalCenter.java
  5. 15 4
      app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java
  6. 11 11
      app/src/main/java/com/kfzs/duanduan/react/MainTab.java
  7. 2 1
      app/src/main/java/com/kfzs/duanduan/services/DownloadTaskService.java
  8. 67 0
      app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java
  9. 21 0
      app/src/main/java/com/sheep/gamegroup/model/api/ITask.java
  10. 230 0
      app/src/main/java/com/sheep/gamegroup/model/entity/FindApp.java
  11. 88 0
      app/src/main/java/com/sheep/gamegroup/model/entity/FindAppReservation.java
  12. 26 0
      app/src/main/java/com/sheep/gamegroup/model/entity/FindAppScore.java
  13. 176 0
      app/src/main/java/com/sheep/gamegroup/model/entity/FindItem.java
  14. 0 34
      app/src/main/java/com/sheep/gamegroup/model/entity/FindLabel.java
  15. 59 0
      app/src/main/java/com/sheep/gamegroup/model/entity/FindTag.java
  16. 57 0
      app/src/main/java/com/sheep/gamegroup/model/entity/MyFindAppCore.java
  17. 2 1
      app/src/main/java/com/sheep/gamegroup/model/entity/TaskEty.java
  18. 1 1
      app/src/main/java/com/sheep/gamegroup/model/util/ExceptionHandle.java
  19. 32 10
      app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java
  20. 9 0
      app/src/main/java/com/sheep/gamegroup/util/Conversion.java
  21. 10 0
      app/src/main/java/com/sheep/gamegroup/util/Conversion2.java
  22. 104 0
      app/src/main/java/com/sheep/gamegroup/util/FindAppHelper.java
  23. 38 10
      app/src/main/java/com/sheep/gamegroup/util/GlideImageLoader.java
  24. 41 14
      app/src/main/java/com/sheep/gamegroup/util/ImageGlarryDrawable.java
  25. 74 0
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  26. 19 0
      app/src/main/java/com/sheep/gamegroup/util/ListUtil.java
  27. 35 2
      app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java
  28. 431 0
      app/src/main/java/com/sheep/gamegroup/view/activity/ActFindGame.java
  29. 325 0
      app/src/main/java/com/sheep/gamegroup/view/activity/ActFindInformation.java
  30. 2 2
      app/src/main/java/com/sheep/gamegroup/view/activity/ActLoadH5.java
  31. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/ActNewAboutUs.java
  32. 255 0
      app/src/main/java/com/sheep/gamegroup/view/activity/ActReservation.java
  33. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/PersionInfoAct.java
  34. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/PhoneAct.java
  35. 2 1
      app/src/main/java/com/sheep/gamegroup/view/activity/TaskDetailAct.java
  36. 0 118
      app/src/main/java/com/sheep/gamegroup/view/customview/CustomWebView.java
  37. 29 0
      app/src/main/java/com/sheep/gamegroup/view/customview/WebViewForScrollView.java
  38. 11 0
      app/src/main/res/color/selector_color_main_tab2.xml
  39. BIN
      app/src/main/res/drawable-xxhdpi/xin_empty.png
  40. BIN
      app/src/main/res/drawable-xxhdpi/xin_full.png
  41. 44 0
      app/src/main/res/drawable/lay_list_progress.xml
  42. 14 0
      app/src/main/res/drawable/lay_list_ratingbar.xml
  43. 9 0
      app/src/main/res/drawable/selector_button_full_main2.xml
  44. 452 0
      app/src/main/res/layout/act_find_game.xml
  45. 1 1
      app/src/main/res/layout/act_understand_sheep.xml
  46. 5 5
      app/src/main/res/layout/fgt_find.xml
  47. 0 21
      app/src/main/res/layout/fgt_find_child.xml
  48. 40 0
      app/src/main/res/layout/fgt_personalcenter_item_center_two.xml
  49. 21 0
      app/src/main/res/layout/find_information_bottom.xml
  50. 71 0
      app/src/main/res/layout/find_information_bottom_item.xml
  51. 64 0
      app/src/main/res/layout/find_information_top.xml
  52. 60 28
      app/src/main/res/layout/find_item.xml
  53. 23 0
      app/src/main/res/layout/find_item_bottom.xml
  54. 16 0
      app/src/main/res/layout/find_item_tag.xml
  55. 57 0
      app/src/main/res/layout/find_reservation_item.xml
  56. 5 0
      app/src/main/res/layout/find_reservation_item_bottom.xml
  57. 17 0
      app/src/main/res/layout/find_reservation_item_center.xml
  58. 22 0
      app/src/main/res/layout/find_reservation_item_top.xml
  59. 35 0
      app/src/main/res/layout/net_empty_fresh_list.xml
  60. 39 0
      app/src/main/res/layout/net_empty_fresh_list_not_wrap.xml
  61. BIN
      app/src/main/res/mipmap-xhdpi/personalc_ic_reservation.png
  62. BIN
      app/src/main/res/mipmap-xxhdpi/bottom_icon.webp
  63. BIN
      app/src/main/res/mipmap-xxhdpi/share.webp
  64. BIN
      app/src/main/res/mipmap-xxhdpi/watch.webp
  65. BIN
      app/src/main/res/mipmap-xxhdpi/xin_ash.png
  66. 28 0
      app/src/main/res/values/dd_styles.xml
  67. 2 0
      app/src/main/res/values/str_network_strings.xml
  68. 2 2
      gradle.properties
  69. 3 3
      view/build.gradle

+ 6 - 0
app/src/main/AndroidManifest.xml

@@ -482,6 +482,12 @@
             android:screenOrientation="portrait"/>
         <activity android:name="com.sheep.gamegroup.view.activity.ActInstallApkList"
             android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActFindGame"
+            android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActFindInformation"
+            android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActReservation"
+            android:screenOrientation="portrait"/>
     </application>
 
 

+ 33 - 16
app/src/main/java/com/kfzs/duanduan/fragment/FgtFind.java

@@ -5,16 +5,24 @@ import android.os.Bundle;
 import android.support.design.widget.TabLayout;
 import android.support.v4.view.ViewPager;
 
+import com.alibaba.fastjson.JSON;
 import com.kfzs.duanduan.BaseCompatFragment;
 import com.kfzs.duanduan.mine.GiftpackListAdapter;
-import com.sheep.gamegroup.model.entity.FindLabel;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.FindTag;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
 
 import java.util.List;
 
 import butterknife.BindView;
 import butterknife.ButterKnife;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.schedulers.Schedulers;
 
 /**
  * Created by realicing on 2018/6/27.
@@ -38,26 +46,35 @@ public class FgtFind extends BaseCompatFragment {
 
     private GiftpackListAdapter mAdapter;
     private void initData(){
-        testInitData();
-        loadData();
-    }
+        SheepApp.getInstance().getNetComponent().getApiService().getFindTagList()
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
+                        List<FindTag> newList = baseMessage.getDatas(FindTag.class);
+                        if(!ListUtil.isEmpty(newList)){
+                            list.clear();
+                            ListUtil.addAll(list, newList);
+                            loadData();
+                        }
+                    }
 
-    private void testInitData() {
-        String[] names = {"全部", "推荐", "专题", "游戏", "资讯"};
-        for (int i = 0; i < names.length; i++) {
-            String name = names[i];
-            FindLabel findLabel = new FindLabel();
-            findLabel.setLabel_name(name);
-            findLabel.setLabel_id(i);
-            findLabelList.add(findLabel);
-        }
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onError "+ JSON.toJSONString(baseMessage));
+                        G.showToast(baseMessage);
+                    }
+                });
     }
 
-    private List<FindLabel> findLabelList = ListUtil.emptyList();
+    private List<FindTag> list = ListUtil.emptyList();
     private void loadData() {
         mAdapter = new GiftpackListAdapter(getFragmentManager(), getContext());
-        for (FindLabel findLabel : findLabelList) {
-            mAdapter.add(FgtFindChild.newInstance(findLabel.getLabel_id()), findLabel.getLabel_name());
+        mAdapter.add(FgtFindChild.newInstance(0), "全部");
+        for (FindTag findLabel : list) {
+            mAdapter.add(FgtFindChild.newInstance(findLabel.getId()), findLabel.getName());
         }
         pager.setAdapter(mAdapter);
         indicator.setupWithViewPager(pager);

+ 195 - 31
app/src/main/java/com/kfzs/duanduan/fragment/FgtFindChild.java

@@ -6,33 +6,43 @@ import android.support.annotation.Nullable;
 import android.support.v4.widget.SwipeRefreshLayout;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
+import android.text.Html;
+import android.text.TextUtils;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.widget.ImageView;
 import android.widget.TextView;
 
+import com.alibaba.fastjson.JSON;
 import com.kfzs.android.view.tag.FlowLayout;
 import com.kfzs.android.view.tag.TagAdapter;
 import com.kfzs.android.view.tag.TagFlowLayout;
 import com.kfzs.duanduan.BaseCompatFragment;
-import com.kfzs.duanduan.mine.GiftpackListAdapter;
+import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.FindItem;
-import com.sheep.gamegroup.model.entity.UserLabel;
-import com.sheep.gamegroup.model.entity.UserLabelList;
+import com.sheep.gamegroup.model.entity.FindTag;
+import com.sheep.gamegroup.model.entity.HomeListEntity;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.SysAppUtil;
 import com.sheep.gamegroup.util.ViewHolder;
 import com.sheep.gamegroup.util.ViewUtil;
-import com.sheep.gamegroup.view.activity.ActUserLabelList;
 import com.sheep.gamegroup.view.adapter.AdbCommonRecycler;
-import com.sheep.gamegroup.view.fragment.FgtTryMakeMoney;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
 
 import java.util.List;
+import java.util.Locale;
 
 import butterknife.BindView;
 import butterknife.ButterKnife;
+import rx.android.schedulers.AndroidSchedulers;
 import rx.functions.Action1;
+import rx.schedulers.Schedulers;
 
 /**
  * Created by realicing on 2018/6/27.
@@ -61,20 +71,25 @@ public class FgtFindChild extends BaseCompatFragment {
     private Activity activity;
     @Override
     protected void initView(Bundle savedInstanceState) {
-        setContentView(R.layout.fgt_find_child);
+        setContentView(R.layout.net_empty_fresh_list);
         activity = getActivity();
         ButterKnife.bind(this, mContentView);
         initView();
         initData();
     }
 
-    @BindView(R.id.find_refresh)
+    @BindView(R.id.title)
+    View title;
+    @BindView(R.id.refresh)
     SwipeRefreshLayout refresh;
+    @BindView(R.id.empty_view)
+    View empty_view;
     @BindView(R.id.check_net_ll)
     View check_net_ll;
-    @BindView(R.id.find_list)
+    @BindView(R.id.view_list)
     RecyclerView view_list;
     private void initView(){
+        title.setVisibility(View.GONE);
         refresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
             @Override
             public void onRefresh() {
@@ -82,46 +97,195 @@ public class FgtFindChild extends BaseCompatFragment {
                 refresh.setRefreshing(false);
             }
         });
+
+        view_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
+        view_list.setAdapter(new AdbCommonRecycler<FindItem>(SheepApp.getInstance(), list){
+
+            @Override
+            public int getItemViewType(int position) {
+                return position;
+            }
+            @Override
+            public int getViewIdByType(int type) {//type来源于 getItemViewType 返回的值
+                if(type == -1 + list.size()){
+                   return R.layout.find_item_bottom;
+                }
+                return R.layout.find_item;
+            }
+
+            @Override
+            public void convert(ViewHolder holder, final FindItem item) {
+                if(item == null){
+                    return;
+                }
+                View rootConvertView = holder.itemView;
+                TextView find_item_name = (TextView)rootConvertView.findViewById(R.id.find_item_name);
+                TextView find_item_time = (TextView)rootConvertView.findViewById(R.id.find_item_time);
+                ImageView find_item_iv = (ImageView)rootConvertView.findViewById(R.id.find_item_iv);
+                TextView find_item_des = (TextView)rootConvertView.findViewById(R.id.find_item_des);
+                TextView find_item_pf_label = (TextView)rootConvertView.findViewById(R.id.find_item_pf_label);
+                TextView find_item_download = (TextView)rootConvertView.findViewById(R.id.find_item_download);
+                TagFlowLayout find_item_tags = (TagFlowLayout)rootConvertView.findViewById(R.id.find_item_tags);
+
+                if(item.isGame()){
+                    find_item_download.setVisibility(View.VISIBLE);
+                    find_item_pf_label.setText(Html.fromHtml(String.format(Locale.CHINA, "评分:<font color='%s'>%.1f</font>", "#29d6fd", item.getScore())));
+                    find_item_download.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            G.showToast("您点击了下载游戏");
+                        }
+                    });
+                } else {
+                    find_item_download.setVisibility(View.GONE);
+                    find_item_pf_label.setVisibility(View.GONE);
+                }
+                ViewUtil.setText(find_item_name, item.getTitle());
+                ViewUtil.setTextTime(find_item_time, item.getCreated_at(), "yyyy-MM-dd");
+                ViewUtil.setImage(find_item_iv, item.getPictures());
+                ViewUtil.setText(find_item_des, item.getDes());
+                if(ListUtil.isEmpty(item.getTages())){
+                    find_item_tags.setVisibility(View.GONE);
+                } else {
+                    find_item_tags.setVisibility(View.VISIBLE);
+                    TagAdapter adapter = new TagAdapter<FindTag>(item.getTages()) {
+                        @Override
+                        public View getView(FlowLayout parent, int position, FindTag item) {
+                            TextView tv = (TextView) LayoutInflater.from(activity).inflate(R.layout.find_item_tag, parent, false);
+                            ViewUtil.setText(tv, item.getName());
+                            return tv;
+                        }
+                    };
+                    find_item_tags.setAdapter(adapter);
+                }
+
+                rootConvertView.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        onClickItem(item);
+                    }
+                });
+            }
+        });
+    }
+
+    /**
+     * 点击一个发现元素
+     * @param item
+     */
+    private void onClickItem(FindItem item) {
+        if(item != null){
+            switch (item.getType()){//类型 1:游戏 2:咨询 3:转跳 4:任务 5:栏目
+                case 1:
+                    Jump2View.getInstance().goFindGame(activity, item);
+                    break;
+                case 2:
+                    Jump2View.getInstance().goFindInformation(activity, item);
+                    break;
+                case 3:
+                    openLink(item);
+                    break;
+                case 4:
+                    Jump2View.getInstance().goTaskDetailView(activity, item.getRelease_task_id());
+                    break;
+                case 5:
+                    openHomeListItem(item);
+                    break;
+            }
+        }
+    }
+
+    /**
+     * 打开一个homelist项
+     * @param item
+     */
+    private void openHomeListItem(FindItem item) {
+        SheepApp.getInstance().getNetComponent().getApiService().getHomeListItem(item.getHome_list_id())
+                        .subscribeOn(Schedulers.io())
+                        .observeOn(AndroidSchedulers.mainThread())
+                        .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                            @Override
+                            public void onNext(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
+                                HomeListEntity homeListEntity = baseMessage.getData(HomeListEntity.class);
+                                if(homeListEntity == null){
+                                    G.showToast(R.string.error_data);
+                                    return;
+                                }
+                                CommonUtil.getInstance().goWhere(activity, homeListEntity);
+                            }
+
+                            @Override
+                            public void onError(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
+                                G.showToast(baseMessage);
+                            }
+                        });
+    }
+
+    /**
+     * 打开一个链接
+     * @param item
+     */
+    private void openLink(FindItem item) {
+        if(TextUtils.isEmpty(item.getUrl())){
+            G.showToast(R.string.error_link);
+            return;
+        }
+        switch (item.getIs_in_url()){//是否外部链接 1:是 0:不是
+            case 1:
+                Jump2View.getInstance().goWeb(activity, item.getUrl());
+                break;
+            default:
+                Jump2View.getInstance().goWeb(activity, item.getUrl(), item.getTitle());
+                break;
+        }
     }
 
     private void initData(){
+        empty_view.setVisibility(View.INVISIBLE);
         SysAppUtil.checkNet(new Action1<Integer>() {
             @Override
             public void call(Integer result) {
                 if(result != 0){//无网络
                     if(check_net_ll != null)
                         check_net_ll.setVisibility(View.VISIBLE);
-                    testInitData();
-                    loadData();
                 } else {
                     if(check_net_ll != null)
                         check_net_ll.setVisibility(View.GONE);
                 }
             }
         });
-    }
+        SheepApp.getInstance().getNetComponent().getApiService().getFindList(1, 100, type)
+                        .subscribeOn(Schedulers.io())
+                        .observeOn(AndroidSchedulers.mainThread())
+                        .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                            @Override
+                            public void onNext(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onNext "+ JSON.toJSONString(baseMessage));
+                                List<FindItem> newList = baseMessage.getDatas(FindItem.class);
+                                if(!ListUtil.isEmpty(newList)){
+                                    list.clear();
+                                    ListUtil.addAll(list, newList);
+                                    if(!list.isEmpty())
+                                        list.add(null);//底部部分----我是有底线的
+                                    notifyDataSetChanged();
+                                }
+                            }
 
-    private void testInitData() {
-        for (int i = 0; i < 10; i++) {
-            list.add(new FindItem());
-        }
+                            @Override
+                            public void onError(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
+                                notifyDataSetChanged();
+                            }
+                        });
     }
-    private List<FindItem> list = ListUtil.emptyList();
-    private void loadData() {
-        view_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
-        view_list.setAdapter(new AdbCommonRecycler<FindItem>(SheepApp.getInstance(), list){
-
-            @Override
-            public int getViewIdByType(int type) {
-                return R.layout.find_item;
-            }
-
-            @Override
-            public void convert(ViewHolder holder, final FindItem item) {
-                View rootConvertView = holder.itemView;
-                TextView user_label_tv = rootConvertView.findViewById(R.id.user_label_tv);
 
-            }
-        });
+    private void notifyDataSetChanged(){
+        if(list.isEmpty())
+            empty_view.setVisibility(View.VISIBLE);
+        refresh.setRefreshing(false);
+        view_list.getAdapter().notifyDataSetChanged();
     }
+    private List<FindItem> list = ListUtil.emptyList();
 }

+ 4 - 1
app/src/main/java/com/kfzs/duanduan/fragment/FgtPersonalCenter.java

@@ -214,7 +214,7 @@ public class FgtPersonalCenter extends BaseCompatFragment {
 
     @OnClick({R.id.icon_img_iv, R.id.account_detail_layout, R.id.personalcenter_price_layout, R.id.account_safe_layout,
             R.id.account_task_layout, R.id.proxy_service_layout, R.id.abourt_us_layout, R.id.feedbook_layout,
-            R.id.recommend_friend_layout, R.id.tv_submit, R.id.faq_layout,
+            R.id.recommend_friend_layout, R.id.tv_submit, R.id.faq_layout, R.id.reservation_layout,
             R.id.version_layout, R.id.clear_layout, R.id.change_layout, R.id.order_layout})
     public void onViewClicked(View view) {
         switch (view.getId()) {
@@ -243,6 +243,9 @@ public class FgtPersonalCenter extends BaseCompatFragment {
                 else
                     Jump2View.getInstance().goWeb(activity, "http://smallstation.kfzs.com/h5_faq/#/faq", "FAQ帮助");
                 break;
+            case R.id.reservation_layout://游戏预约
+                Jump2View.getInstance().goActReservation(activity);
+                break;
             case R.id.abourt_us_layout://关于我们
                 Jump2View.getInstance().goNewAboutUs(activity);
                 break;

+ 15 - 4
app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java

@@ -64,6 +64,7 @@ import com.sheep.gamegroup.presenter.TryMakeMoneyContract;
 import com.sheep.gamegroup.presenter.TryMakeMoneyPresenter;
 import com.sheep.gamegroup.util.AppUtil;
 import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.Conversion2;
 import com.sheep.gamegroup.util.ImageGlarryDrawable;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.ListUtil;
@@ -853,17 +854,27 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
         super.onStart();
     }
 
+    private Conversion2<SlideshowEty, String, String> conversion2 = new Conversion2<SlideshowEty, String, String>() {
+        @Override
+        public String convert1(SlideshowEty slideshowEty, int position) {
+            return slideshowEty.getTitle();
+        }
 
-    private ImageGlarryDrawable mImageGlarryStr;
+        @Override
+        public String convert2(SlideshowEty slideshowEty, int position) {
+            return slideshowEty.getUrl();
+        }
+    };
+    private ImageGlarryDrawable<SlideshowEty> mImageGlarryStr;
     private void bindBanner() {
         homepage_item_banner_layout.setVisibility(View.VISIBLE);
         if (mImageGlarryStr != null) {
-            mImageGlarryStr.init((ArrayList<SlideshowEty>) slideshowEtyLists, ImageView.ScaleType.CENTER_CROP);
+            mImageGlarryStr.init(slideshowEtyLists, ImageView.ScaleType.CENTER_CROP, conversion2);
             mImageGlarryStr.notifyDataSetChanged();
             return;
         }
-        mImageGlarryStr = new ImageGlarryDrawable((Activity) mContext, viewpager_banner, group_banner);
-        mImageGlarryStr.init((ArrayList<SlideshowEty>) slideshowEtyLists, ImageView.ScaleType.CENTER_CROP);
+        mImageGlarryStr = new ImageGlarryDrawable<>((Activity) mContext, viewpager_banner, group_banner);
+        mImageGlarryStr.init(slideshowEtyLists, ImageView.ScaleType.CENTER_CROP, conversion2);
         mImageGlarryStr.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {

+ 11 - 11
app/src/main/java/com/kfzs/duanduan/react/MainTab.java

@@ -46,17 +46,17 @@ public enum MainTab {
             return R.drawable.drawable_selector_class;
         }
     },*/
-//    Fgt_Find(R.string.main_tab_find) {
-//        @Override
-//        public Fragment getFragment() {
-//            return new FgtFind();
-//        }
-//
-//        @Override
-//        public int getDrawableId() {
-//            return R.drawable.drawable_selector_class;
-//        }
-//    },
+    Fgt_Find(R.string.main_tab_find) {
+        @Override
+        public Fragment getFragment() {
+            return new FgtFind();
+        }
+
+        @Override
+        public int getDrawableId() {
+            return R.drawable.drawable_selector_class;
+        }
+    },
     FgtPersonnalCenter(R.string.personal_center) {
         @Override
         public Fragment getFragment() {

+ 2 - 1
app/src/main/java/com/kfzs/duanduan/services/DownloadTaskService.java

@@ -11,6 +11,7 @@ import com.kfzs.duanduan.datashare.DDProviderHelper;
 import com.kfzs.duanduan.datashare.provider.download.DownLoadInfo;
 import com.kfzs.duanduan.event.BigEvent;
 import com.kfzs.duanduan.event.EventTypes;
+import com.sheep.gamegroup.model.api.ITask;
 import com.sheep.gamegroup.model.entity.DialogEntity;
 import com.sheep.gamegroup.model.entity.OrienteeringDetail;
 import com.sheep.gamegroup.model.entity.TaskEty;
@@ -156,7 +157,7 @@ public class DownloadTaskService {
     }
 
 
-    public DownLoadInfo getDownloadTaskByUrl(TaskEty taskEty) {
+    public DownLoadInfo getDownloadTaskByUrl(ITask taskEty) {
         DownLoadInfo downLoadInfo = getDownloadTaskByUrl(taskEty.getDownload_link());
         if(downLoadInfo == null){
             downLoadInfo = CommonUtil.getInstance()

+ 67 - 0
app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java

@@ -8,6 +8,7 @@ import java.util.Map;
 
 import retrofit2.Call;
 import retrofit2.http.Body;
+import retrofit2.http.DELETE;
 import retrofit2.http.FieldMap;
 import retrofit2.http.FormUrlEncoded;
 import retrofit2.http.GET;
@@ -587,4 +588,70 @@ public interface ApiService {
     @GET("app/user/recharge_log")
     Observable<BaseMessage> rechargeLog(@Query("page") int page, @Query("per_page") int per_page);
 
+
+    /**
+     * 获取标签列表
+     */
+    @GET("app/find/articles_tags/list")
+    Observable<BaseMessage> getFindTagList();
+    /**
+     * 发现模块列表
+     */
+    @GET("app/find/articles/list")
+    Observable<BaseMessage> getFindList(@Query("page") int page, @Query("per_page") int per_page, @Query("tag_id") int id);
+    /**
+     * 发现内容详情
+     */
+    @GET("app/find/articles")
+    Observable<BaseMessage> getFindDetail(@Query("id") int id);
+    /**
+     * 应用评分
+     * {
+     "application_id": 0,
+     "score": 0,
+     "user_id": 0
+     }
+     */
+    @POST("app/find/applications/score")
+    Observable<BaseMessage> commitAppScore(@Body JSONObject jsonObject);
+    /**
+     * 获取应用详情
+     */
+    @GET("app/find/applications")
+    Observable<BaseMessage> getAppDetail(@Query("id") int id);
+    /**
+     * 应用 各评分人数
+     */
+    @GET("app/find/applications/score_num")
+    Observable<BaseMessage> getAppScoreNum(@Query("id") int id);
+    /**
+     * 应用我的评分
+     */
+    @GET("app/find/applications/my_score")
+    Observable<BaseMessage> getMyAppScore(@Query("id") int id);
+    /**
+     * 应用 下载/预约 时先调用此接口生成记录
+     */
+    @GET("app/find/applications/downloads")
+    Observable<BaseMessage> getDownloads(@Query("id") int id);
+    /**
+     * 取消  应用 下载/预约
+     */
+    @DELETE("app/find/applications/downloads")
+    Observable<BaseMessage> deleteDownloads(@Query("id") int id);
+    /**
+     * 获取预约未下载数量
+     */
+    @GET("app/find/applications/downloads/status")
+    Observable<BaseMessage> getFindAppDownloadsStatus();
+    /**
+     * 获取预约下载列表
+     */
+    @GET("app/find/applications/downloads_list")
+    Observable<BaseMessage> getFindAppReservationList(@Query("page") int page, @Query("per_page") int per_page);
+    /**
+     * 首页list
+     */
+    @GET("app/home_list/{id}")
+    Observable<BaseMessage> getHomeListItem(@Path("id") int id);
 }

+ 21 - 0
app/src/main/java/com/sheep/gamegroup/model/api/ITask.java

@@ -0,0 +1,21 @@
+package com.sheep.gamegroup.model.api;
+
+/**
+ * Created by realicing on 2018/6/29.
+ * realicing@sina.com
+ */
+public interface ITask {
+    String getPackage_names();//任务的包名
+
+    int getTask_type();//任务的类型
+
+    String getDownload_link();//任务的下载链接
+
+    String getTask_name();//任务的名称
+
+    String getIcon();//任务的图标
+
+    String getPackage_size();//任务的包大小
+
+    int getAcceptedTaskId();//任务的id
+}

+ 230 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/FindApp.java

@@ -0,0 +1,230 @@
+package com.sheep.gamegroup.model.entity;
+
+import com.sheep.gamegroup.model.api.ITask;
+
+/**
+ * Created by realicing on 2018/6/28.
+ * realicing@sina.com
+ */
+public class FindApp implements ITask{
+    private int updated_at;
+
+    private float score;//评分
+
+    private String download_url;//下载地址
+
+    private String package_size;//包d大小单位M
+
+    private int Id;
+
+    private String versions;//版本号
+
+    private String pictures;//宣传图标(分号隔开)
+
+    private String package_name;//应用包名称
+
+    private int platform;//平台 0:全 1:安卓 2:IOS
+
+    private int status;//1:开启 2:关闭
+
+    private String icon;//应用图标
+
+    private String name;//应用名称
+
+    private int created_at;
+
+    private String intro;//应用简介
+
+    private int download_at;//预约下载开放时间
+
+    private String manufacturer;//厂商
+
+    private int score_count;//评分人数
+
+    private int download_type;//1:非预约下载 2:预约下载
+
+    private int download_count;//下载数量
+
+    private int download;//1:可以下载
+
+    public void setUpdated_at(int updated_at){
+        this.updated_at = updated_at;
+    }
+    public int getUpdated_at(){
+        return this.updated_at;
+    }
+    public void setScore(float score){
+        this.score = score;
+    }
+    public float getScore(){
+        return this.score;
+    }
+    public void setDownload_url(String download_url){
+        this.download_url = download_url;
+    }
+    public String getDownload_url(){
+        return this.download_url;
+    }
+    public void setPackage_size(String package_size){
+        this.package_size = package_size;
+    }
+    public String getPackage_size(){
+        return this.package_size;
+    }
+    public void setId(int Id){
+        this.Id = Id;
+    }
+    public int getId(){
+        return this.Id;
+    }
+    public void setVersions(String versions){
+        this.versions = versions;
+    }
+    public String getVersions(){
+        return this.versions;
+    }
+    public void setPictures(String pictures){
+        this.pictures = pictures;
+    }
+    public String getPictures(){
+        return this.pictures;
+    }
+    public void setPackage_name(String package_name){
+        this.package_name = package_name;
+    }
+    public String getPackage_name(){
+        return this.package_name;
+    }
+    public void setPlatform(int platform){
+        this.platform = platform;
+    }
+    public int getPlatform(){
+        return this.platform;
+    }
+    public void setStatus(int status){
+        this.status = status;
+    }
+    public int getStatus(){
+        return this.status;
+    }
+    public void setIcon(String icon){
+        this.icon = icon;
+    }
+    public String getIcon(){
+        return this.icon;
+    }
+    public void setName(String name){
+        this.name = name;
+    }
+    public String getName(){
+        return this.name;
+    }
+    public void setCreated_at(int created_at){
+        this.created_at = created_at;
+    }
+    public int getCreated_at(){
+        return this.created_at;
+    }
+    public void setIntro(String intro){
+        this.intro = intro;
+    }
+    public String getIntro(){
+        return this.intro;
+    }
+    public void setDownload_at(int download_at){
+        this.download_at = download_at;
+    }
+    public int getDownload_at(){
+        return this.download_at;
+    }
+    public void setManufacturer(String manufacturer){
+        this.manufacturer = manufacturer;
+    }
+    public String getManufacturer(){
+        return this.manufacturer;
+    }
+    public void setScore_count(int score_count){
+        this.score_count = score_count;
+    }
+    public int getScore_count(){
+        return this.score_count;
+    }
+    public void setDownload_type(int download_type){
+        this.download_type = download_type;
+    }
+    public int getDownload_type(){
+        return this.download_type;
+    }
+    public void setDownload_count(int download_count){
+        this.download_count = download_count;
+    }
+    public int getDownload_count(){
+        return this.download_count;
+    }
+
+    public int getDownload() {
+        return download;
+    }
+
+    public void setDownload(int download) {
+        this.download = download;
+    }
+
+
+
+
+
+
+
+
+
+
+
+    @Override
+    public String getPackage_names() {
+        return package_name;
+    }
+
+    @Override
+    public int getTask_type() {
+        return 3;
+    }
+
+    @Override
+    public String getDownload_link() {
+        return download_url;
+    }
+
+    @Override
+    public String getTask_name() {
+        return name;
+    }
+
+    @Override
+    public int getAcceptedTaskId() {
+        return Id;
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    /**
+     * 是否可以下载
+     * @return
+     */
+    public boolean isCanDonload(){
+        return download == 1;//可以下载
+    }
+}

+ 88 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/FindAppReservation.java

@@ -0,0 +1,88 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/6/29.
+ * realicing@sina.com
+ */
+public class FindAppReservation {
+    private int UserId;
+
+    private int Type;//2:预约 1:下载
+
+    private int UpdatedAt;
+
+    private int ApplicationId;
+
+    private FindApp application;
+
+    private int Id;
+
+    private int Status;//预约下载状态:1:预约未下载 2:预约已下载 (直接下载默认0)
+
+    private int CreatedAt;
+
+    public void setUserId(int UserId){
+        this.UserId = UserId;
+    }
+    public int getUserId(){
+        return this.UserId;
+    }
+    public void setType(int Type){
+        this.Type = Type;
+    }
+    public int getType(){
+        return this.Type;
+    }
+    public void setUpdatedAt(int UpdatedAt){
+        this.UpdatedAt = UpdatedAt;
+    }
+    public int getUpdatedAt(){
+        return this.UpdatedAt;
+    }
+    public void setApplicationId(int ApplicationId){
+        this.ApplicationId = ApplicationId;
+    }
+    public int getApplicationId(){
+        return this.ApplicationId;
+    }
+    public void setApplication(FindApp application){
+        this.application = application;
+    }
+    public FindApp getApplication(){
+        return this.application;
+    }
+    public void setId(int Id){
+        this.Id = Id;
+    }
+    public int getId(){
+        return this.Id;
+    }
+    public void setStatus(int Status){
+        this.Status = Status;
+    }
+    public int getStatus(){
+        return this.Status;
+    }
+    public void setCreatedAt(int CreatedAt){
+        this.CreatedAt = CreatedAt;
+    }
+    public int getCreatedAt(){
+        return this.CreatedAt;
+    }
+
+
+
+
+
+
+
+    private boolean cancel;//取消预约状态:默认没有取消预约为false
+
+    public boolean isCancel() {
+        return cancel;
+    }
+
+    public void setCancel(boolean cancel) {
+        this.cancel = cancel;
+    }
+}

+ 26 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/FindAppScore.java

@@ -0,0 +1,26 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/6/29.
+ * realicing@sina.com
+ */
+public class FindAppScore {
+    private int star;
+    private int num;
+
+    public int getStar() {
+        return star;
+    }
+
+    public void setStar(int star) {
+        this.star = star;
+    }
+
+    public int getNum() {
+        return num;
+    }
+
+    public void setNum(int num) {
+        this.num = num;
+    }
+}

+ 176 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/FindItem.java

@@ -1,8 +1,184 @@
 package com.sheep.gamegroup.model.entity;
 
+import com.alibaba.fastjson.annotation.JSONField;
+import com.sheep.gamegroup.util.ListUtil;
+
+import java.util.List;
+
 /**
  * Created by realicing on 2018/6/27.
  * realicing@sina.com
+ *
  */
 public class FindItem {
+    private int updated_at;
+
+    private List<FindTag> tages ;
+
+    private int recommend_type;//咨询类型1:游戏 2:任务
+
+    private String url;//转跳链接
+
+    private String content;//内容
+
+    private String pictures;//图片 多图用;隔开
+
+    private int platform;//0:全平台 1:安卓 2:IOS
+
+    private int is_display;//是否显示
+
+    private int home_list_id;//首页菜单的ID
+
+    private String title;//标题
+
+    private int id;
+
+    private int is_in_url;//是否外部链接 1:是 0:不是
+
+    private float score;
+
+    private int release_task_id;//发布的任务ID (咨询和任务时)
+
+    @JSONField(name ="abstract")
+    private String des;//摘要
+
+    private int created_at;
+
+    private int application_id;//应用ID (咨询和游戏时)
+
+    private String clicks;//点击次数
+
+    private int sort;//排序
+
+    private int type;//类型 1:游戏 2:咨询 3:转跳 4:任务 5:栏目
+
+    public void setUpdated_at(int updated_at){
+        this.updated_at = updated_at;
+    }
+    public int getUpdated_at(){
+        return this.updated_at;
+    }
+    public void setTages(List<FindTag> tages){
+        this.tages = tages;
+    }
+    public List<FindTag> getTages(){
+        return this.tages;
+    }
+    public void setRecommend_type(int recommend_type){
+        this.recommend_type = recommend_type;
+    }
+    public int getRecommend_type(){
+        return this.recommend_type;
+    }
+    public void setUrl(String url){
+        this.url = url;
+    }
+    public String getUrl(){
+        return this.url;
+    }
+    public void setContent(String content){
+        this.content = content;
+    }
+    public String getContent(){
+        return this.content;
+    }
+    public void setPictures(String pictures){
+        this.pictures = pictures;
+    }
+    public String getPictures(){
+        return this.pictures;
+    }
+    public void setPlatform(int platform){
+        this.platform = platform;
+    }
+    public int getPlatform(){
+        return this.platform;
+    }
+    public void setIs_display(int is_display){
+        this.is_display = is_display;
+    }
+    public int getIs_display(){
+        return this.is_display;
+    }
+    public void setHome_list_id(int home_list_id){
+        this.home_list_id = home_list_id;
+    }
+    public int getHome_list_id(){
+        return this.home_list_id;
+    }
+    public void setTitle(String title){
+        this.title = title;
+    }
+    public String getTitle(){
+        return this.title;
+    }
+    public void setId(int id){
+        this.id = id;
+    }
+    public int getId(){
+        return this.id;
+    }
+    public void setIs_in_url(int is_in_url){
+        this.is_in_url = is_in_url;
+    }
+    public int getIs_in_url(){
+        return this.is_in_url;
+    }
+    public void setRelease_task_id(int release_task_id){
+        this.release_task_id = release_task_id;
+    }
+    public int getRelease_task_id(){
+        return this.release_task_id;
+    }
+    public void setDes(String des){
+        this.des = des;
+    }
+    public String getDes(){
+        return this.des;
+    }
+    public void setCreated_at(int created_at){
+        this.created_at = created_at;
+    }
+    public int getCreated_at(){
+        return this.created_at;
+    }
+    public void setApplication_id(int application_id){
+        this.application_id = application_id;
+    }
+    public int getApplication_id(){
+        return this.application_id;
+    }
+    public void setClicks(String clicks){
+        this.clicks = clicks;
+    }
+    public String getClicks(){
+        return this.clicks;
+    }
+    public void setSort(int sort){
+        this.sort = sort;
+    }
+    public int getSort(){
+        return this.sort;
+    }
+    public void setType(int type){
+        this.type = type;
+    }
+    public int getType(){
+        return this.type;
+    }
+    public void setScore(float score) {
+        this.score = score;
+    }
+
+    public float getScore() {
+        return score;
+    }
+
+
+
+    //是否是游戏,游戏要显示下载游戏与评分
+    public boolean isGame() {
+        return type == 1;//类型 1:游戏 2:咨询 3:转跳 4:任务 5:栏目
+    }
+
 }

+ 0 - 34
app/src/main/java/com/sheep/gamegroup/model/entity/FindLabel.java

@@ -1,34 +0,0 @@
-package com.sheep.gamegroup.model.entity;
-
-/**
- * Created by realicing on 2018/6/27.
- * realicing@sina.com
- */
-public class FindLabel {
-    private String label_name;
-
-    private int label_id;
-
-    public void setLabel_name(String label_name){
-        this.label_name = label_name;
-    }
-    public String getLabel_name(){
-        return this.label_name;
-    }
-    public void setLabel_id(int label_id){
-        this.label_id = label_id;
-    }
-    public int getLabel_id(){
-        return this.label_id;
-    }
-
-    private boolean isChecked;
-
-    public boolean isChecked() {
-        return isChecked;
-    }
-
-    public void setChecked(boolean checked) {
-        isChecked = checked;
-    }
-}

+ 59 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/FindTag.java

@@ -0,0 +1,59 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/6/27.
+ * realicing@sina.com
+ */
+public class FindTag {
+
+    private int updated_at;
+
+    private int status;//1:开启 2:关闭
+
+    private int id;
+
+    private String remark;//备注
+
+    private String name;//标签名称
+
+    private int created_at;
+
+    public void setUpdated_at(int updated_at){
+        this.updated_at = updated_at;
+    }
+    public int getUpdated_at(){
+        return this.updated_at;
+    }
+    public void setStatus(int status){
+        this.status = status;
+    }
+    public int getStatus(){
+        return this.status;
+    }
+    public void setId(int id){
+        this.id = id;
+    }
+    public int getId(){
+        return this.id;
+    }
+    public void setRemark(String remark){
+        this.remark = remark;
+    }
+    public String getRemark(){
+        return this.remark;
+    }
+    public void setName(String name){
+        this.name = name;
+    }
+    public String getName(){
+        return this.name;
+    }
+    public void setCreated_at(int created_at){
+        this.created_at = created_at;
+    }
+    public int getCreated_at(){
+        return this.created_at;
+    }
+
+
+}

+ 57 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/MyFindAppCore.java

@@ -0,0 +1,57 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/6/29.
+ * realicing@sina.com
+ */
+public class MyFindAppCore {
+
+    private int UserId;
+
+    private int UpdatedAt;
+
+    private int ApplicationId;
+
+    private int Id;
+
+    private int Score;
+
+    private int CreatedAt;
+
+    public void setUserId(int UserId){
+        this.UserId = UserId;
+    }
+    public int getUserId(){
+        return this.UserId;
+    }
+    public void setUpdatedAt(int UpdatedAt){
+        this.UpdatedAt = UpdatedAt;
+    }
+    public int getUpdatedAt(){
+        return this.UpdatedAt;
+    }
+    public void setApplicationId(int ApplicationId){
+        this.ApplicationId = ApplicationId;
+    }
+    public int getApplicationId(){
+        return this.ApplicationId;
+    }
+    public void setId(int Id){
+        this.Id = Id;
+    }
+    public int getId(){
+        return this.Id;
+    }
+    public void setScore(int Score){
+        this.Score = Score;
+    }
+    public int getScore(){
+        return this.Score;
+    }
+    public void setCreatedAt(int CreatedAt){
+        this.CreatedAt = CreatedAt;
+    }
+    public int getCreatedAt(){
+        return this.CreatedAt;
+    }
+}

+ 2 - 1
app/src/main/java/com/sheep/gamegroup/model/entity/TaskEty.java

@@ -4,6 +4,7 @@ import android.text.TextUtils;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.sheep.gamegroup.model.api.ITask;
 import com.sheep.gamegroup.util.ListUtil;
 
 import java.io.Serializable;
@@ -14,7 +15,7 @@ import java.util.List;
  * Created by ljy on 2018/3/20.
  */
 
-public class TaskEty implements Serializable{
+public class TaskEty implements Serializable, ITask {
     private String boot_address;//private String string",
     private String create_time;// 0,
     private String download_link;//private String string",

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/model/util/ExceptionHandle.java

@@ -71,7 +71,7 @@ public class ExceptionHandle {
             return ex;
         } else {
             ex = new ResponeThrowable(e, ERROR.UNKNOWN);
-            ex.message = "服务器繁忙请稍候再试";//未知错误
+            ex.message = "未知错误,请稍候再试";//未知错误
             return ex;
         }
     }

+ 32 - 10
app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java

@@ -24,29 +24,22 @@ import com.arialyy.aria.core.inf.IEntity;
 import com.kfzs.duanduan.datashare.provider.download.DownLoadInfo;
 import com.kfzs.duanduan.event.BigEvent;
 import com.kfzs.duanduan.event.EventTypes;
-import com.kfzs.duanduan.fragment.FgtSmallSheep;
-import com.kfzs.duanduan.utils.dlg.SkipUtils;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.alipay.PayResult;
-import com.sheep.gamegroup.model.entity.AppUsage;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.Ext;
 import com.sheep.gamegroup.model.entity.HomeListEntity;
 import com.sheep.gamegroup.model.entity.RequestParameEty;
-import com.sheep.gamegroup.model.entity.TaskAcceptedEty;
 import com.sheep.gamegroup.model.entity.TaskChild;
 import com.sheep.gamegroup.model.entity.TaskDescEntity;
 import com.sheep.gamegroup.model.entity.TaskEty;
-import com.sheep.gamegroup.model.entity.TaskListen;
 import com.sheep.gamegroup.model.entity.UserEntity;
-import com.sheep.gamegroup.model.entity.WebviewEntity;
 import com.sheep.gamegroup.model.entity.WithdrawalEty;
 import com.sheep.gamegroup.model.util.AutoTaskListUtil;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.presenter.TryMakeMoneyPresenter;
 import com.sheep.gamegroup.usage.AppUsageManager;
 import com.sheep.gamegroup.view.activity.GameTaskOrderListAct;
-import com.sheep.gamegroup.view.activity.RechargeAct;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.ClassFileHelper;
@@ -55,12 +48,9 @@ import com.sheep.jiuyan.samllsheep.utils.SpUtils;
 import com.umeng.socialize.ShareAction;
 import com.umeng.socialize.UMAuthListener;
 import com.umeng.socialize.UMShareAPI;
-import com.umeng.socialize.UMShareListener;
 import com.umeng.socialize.bean.SHARE_MEDIA;
 import com.umeng.socialize.media.UMImage;
 import com.umeng.socialize.media.UMWeb;
-import com.umeng.socialize.shareboard.SnsPlatform;
-import com.umeng.socialize.utils.ShareBoardlistener;
 
 import org.greenrobot.eventbus.EventBus;
 
@@ -1003,6 +993,38 @@ public class CommonUtil {
                 });
     }
 
+    public void updateUserInfo(final Action1<UserEntity> action1) {
+        SheepApp.get(SheepApp.getInstance())
+                .getNetComponent()
+                .getApiService()
+                .getInfo()
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage.getMsg() + "");
+                        if (action1 != null)
+                            action1.call(null);
+
+                    }
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        UserEntity userEntity = baseMessage.getData(UserEntity.class);
+                        if (userEntity != null) {
+                            try {
+                                MyDbManager.getInstance().saveOrUpdateUser(userEntity);
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }
+                        }
+                        if (action1 != null)
+                            action1.call(userEntity);
+                    }
+                });
+    }
+
     /**
      * 判断地址是否为图片
      */

+ 9 - 0
app/src/main/java/com/sheep/gamegroup/util/Conversion.java

@@ -0,0 +1,9 @@
+package com.sheep.gamegroup.util;
+
+/**
+ * Created by realicing on 2018/6/29.
+ * realicing@sina.com
+ */
+public interface Conversion<V, R> {
+    R convert(V v, int position);
+}

+ 10 - 0
app/src/main/java/com/sheep/gamegroup/util/Conversion2.java

@@ -0,0 +1,10 @@
+package com.sheep.gamegroup.util;
+
+/**
+ * Created by realicing on 2018/6/29.
+ * realicing@sina.com
+ */
+public interface Conversion2<V, R1, R2> {
+    R1 convert1(V v, int position);
+    R2 convert2(V v, int position);
+}

+ 104 - 0
app/src/main/java/com/sheep/gamegroup/util/FindAppHelper.java

@@ -0,0 +1,104 @@
+package com.sheep.gamegroup.util;
+
+import android.app.Activity;
+import android.view.Gravity;
+import android.view.View;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.kfzs.duanduan.services.DownloadTaskService;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.DialogConfig;
+import com.sheep.gamegroup.model.entity.FindApp;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.view.activity.TaskDetailAct;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import java.util.Locale;
+
+import rx.android.schedulers.AndroidSchedulers;
+import rx.functions.Action1;
+import rx.schedulers.Schedulers;
+
+/**
+ * Created by realicing on 2018/6/29.
+ * realicing@sina.com
+ */
+public class FindAppHelper {
+    private boolean isCommitAppDownloadsSuccess = false;//是否提交预约
+    private Activity activity;
+    private FindApp findApp;
+    private TextView find_game_down_tv;
+    public void updateView(Activity activity, final FindApp findApp, final TextView find_game_down_tv) {
+        this.activity = activity;
+        this.findApp = findApp;
+        this.find_game_down_tv = find_game_down_tv;
+
+        if(findApp.isCanDonload()){//可下载
+            if(mDownloadTaskService == null){
+                mDownloadTaskService = new DownloadTaskService(activity);
+            }
+            TaskDetailAct.setBtnStr(findApp, mDownloadTaskService, new Action1<Object>() {
+                @Override
+                public void call(Object o) {
+//                    find_game_down_tv.setText("立即下载");
+                }
+            });
+            find_game_down_tv.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View view) {
+                    commitAppDownloads(false, findApp);
+                    downloadApp(findApp);
+                }
+            });
+        } else {//预约下载
+            find_game_down_tv.setText("预约下载");
+            find_game_down_tv.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View view) {
+                    if(isCommitAppDownloadsSuccess){//已经提交成功
+                    } else {//没有提交过或者提交失败的
+                        find_game_down_tv.setEnabled(false);
+                        commitAppDownloads(true, findApp);
+                    }
+                }
+            });
+        }
+    }
+    private DownloadTaskService mDownloadTaskService;
+    //下载应用
+    private void downloadApp(FindApp findApp) {
+    }
+
+    //点击预约下载与立即下载时,需要调用这个接口记录到服务器
+    private void commitAppDownloads(final boolean isNeedReservation, final FindApp findApp) {
+        SheepApp.getInstance().getNetComponent().getApiService().getDownloads(findApp.getId())
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onNext "+ JSON.toJSONString(baseMessage));
+                        if(isNeedReservation){//提交预约成功
+                            find_game_down_tv.setText("预约成功");
+                            find_game_down_tv.setEnabled(false);
+                            ViewUtil.showMsgDialog(activity, new DialogConfig().setTitle("预约成功")
+                                    .setMsg(String.format(Locale.CHINA, "请在%s准时到小绵羊下载哦", TimeUtil.TimeStamp2Date(findApp.getDownload_at(), "yyyy年MM月dd日\tHH时mm分")))
+                                    .setMsgGravity(Gravity.START).setBtnLeftText("我知道了"));
+                        } else {//提交下载成功
+                            find_game_down_tv.setEnabled(true);
+                        }
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
+                        if(isNeedReservation) {
+                            G.showToast("预约失败");
+                        }
+                        find_game_down_tv.setEnabled(true);
+                    }
+                });
+    }
+}

+ 38 - 10
app/src/main/java/com/sheep/gamegroup/util/GlideImageLoader.java

@@ -1,11 +1,12 @@
 package com.sheep.gamegroup.util;
 
-import android.app.Activity;
 import android.widget.ImageView;
 
 import com.bumptech.glide.Glide;
+import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
 import com.bumptech.glide.request.RequestOptions;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
 
 /**
  * Created by realicing on 2018/3/26.
@@ -14,18 +15,45 @@ import com.sheep.jiuyan.samllsheep.R;
 
 public class GlideImageLoader {
 
-    public static void displayImage(Activity activity, ImageView imageView, String path, int id){
-        Glide.with(activity)
-                .load(path)
-                .apply(new RequestOptions().centerCrop()
-                .placeholder(id))
+    public static void setImage(ImageView imageView, String url){
+        Glide.with(SheepApp.getInstance())
+                .load(url)
+                .into(imageView);
+    }
+    public static void centerImage(ImageView imageView, String url, int id){
+        Glide.with(SheepApp.getInstance())
+                .load(url)
+                .apply(new RequestOptions().centerCrop().placeholder(id))
                 .into(imageView);
     }
-    public static void displayImage(Activity activity, ImageView imageView, String path){
-        Glide.with(activity)
+    public static void centerImage(ImageView imageView, String path){
+        Glide.with(SheepApp.getInstance())
                 .load(path)
-                .apply(new RequestOptions().centerCrop()
-                .placeholder(R.drawable.loading_01))
+                .apply(new RequestOptions().centerCrop().placeholder(R.drawable.loading_01))
+                .into(imageView);
+    }
+    public static void circleImage(ImageView imageView, String url, int id){
+        Glide.with(SheepApp.getInstance())
+                .load(url)
+                .apply(new RequestOptions().circleCrop().placeholder(id))
+                .into(imageView);
+    }
+    public static void circleImage(ImageView imageView, String url){
+        Glide.with(SheepApp.getInstance())
+                .load(url)
+                .apply(new RequestOptions().circleCrop().placeholder(R.drawable.loading_01))
+                .into(imageView);
+    }
+    public static void roundedCornersImage(ImageView imageView, String url, int radius, int id){
+        Glide.with(SheepApp.getInstance())
+                .load(url)
+                .apply(new RequestOptions().transform(new RoundedCorners(radius)).placeholder(id))
+                .into(imageView);
+    }
+    public static void roundedCornersImage(ImageView imageView, String url, int radius){
+        Glide.with(SheepApp.getInstance())
+                .load(url)
+                .apply(new RequestOptions().transform(new RoundedCorners(radius)).placeholder(R.drawable.loading_01))
                 .into(imageView);
     }
 }

+ 41 - 14
app/src/main/java/com/sheep/gamegroup/util/ImageGlarryDrawable.java

@@ -32,15 +32,16 @@ import java.util.List;
  * Created by ljy on 2018/4/2.
  */
 
-public class ImageGlarryDrawable {
+public class ImageGlarryDrawable<T> {
     private Activity mActivity;
     private ViewPager mViewPager;
     private RadioGroup mRadioGroup;
-    private List<SlideshowEty> mList = new ArrayList<>();
+    private List<T> mList = new ArrayList<>();
     private int mIntDelayTime = 4000;
     private List<RelativeLayout> mListImages = new ArrayList<>();
     private View mLastSelect;
     private boolean mIsMoved = false;
+    private boolean isSetBackGround = true;//是否设置背景
 
     public ImageGlarryDrawable(Activity activity, ViewPager viewPager, RadioGroup radioGroup) {
         mActivity = activity;
@@ -53,8 +54,8 @@ public class ImageGlarryDrawable {
         this.mIntDelayTime = mIntDelayTime;
     }
 
-    public ImageGlarryDrawable init(ArrayList<SlideshowEty> pics) {
-        return init(pics, ImageView.ScaleType.CENTER_INSIDE);
+    public ImageGlarryDrawable init(List<T> pics, Conversion2<T,String,String> conversion2) {
+        return init(pics, ImageView.ScaleType.CENTER_INSIDE,conversion2);
     }
 
     /**
@@ -62,15 +63,18 @@ public class ImageGlarryDrawable {
      *
      * @param pics 图片Url完整地址。
      */
-    public ImageGlarryDrawable init(ArrayList<SlideshowEty> pics, ImageView.ScaleType scaleType) {
+    public ImageGlarryDrawable init(List<T> pics, ImageView.ScaleType scaleType, Conversion2<T,String,String> conversion2) {
         int pos = 0;
         mList.clear();
         mListImages.clear();
         mLastSelect = null;
         mRadioGroup.removeAllViews();
         //防止loading图案被放得很大很大
-        for (SlideshowEty pic : pics) {
+        for (T pic : pics) {
             mList.add(pic);
+            String title = conversion2.convert1(pic,pos);
+            title = title == null ? "" : title;
+            String url = conversion2.convert2(pic,pos);
             RelativeLayout relativeLayout = new RelativeLayout(mActivity);
             relativeLayout.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT , RelativeLayout.LayoutParams.WRAP_CONTENT));
             TextView textView = new TextView(mActivity);
@@ -78,25 +82,27 @@ public class ImageGlarryDrawable {
             RelativeLayout.LayoutParams textViewLayoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
             textViewLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
             textView.setLayoutParams(textViewLayoutParams);
-            textView.setText(pic.getTitle()+"");
+            textView.setText(title);
             textView.setTextColor(mActivity.getResources().getColor(R.color.white));
-            textView.setGravity(Gravity.LEFT|Gravity.CENTER_VERTICAL);
+            textView.setGravity(Gravity.START|Gravity.CENTER_VERTICAL);
             textView.setLines(1);
             textView.setEllipsize(TextUtils.TruncateAt.MARQUEE);
             textView.setPadding(8, 3, 3, 3);
-            textView.setBackgroundColor(mActivity.getResources().getColor(R.color.dark));
-            textView.setBackground(mActivity.getResources().getDrawable(R.drawable.sp_bg_gradient_retangle_transe));
-            textView.getBackground().mutate().setAlpha(100);
+            if(isSetBackGround) {
+                textView.setBackgroundColor(mActivity.getResources().getColor(R.color.dark));
+                textView.setBackground(mActivity.getResources().getDrawable(R.drawable.sp_bg_gradient_retangle_transe));
+                textView.getBackground().mutate().setAlpha(100);
+            }
 
 
             ImageView imageView = new ImageView(mActivity);
             imageView.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT , RelativeLayout.LayoutParams.MATCH_PARENT));
             imageView.setOnClickListener(new ImageGlarryDrawable.cls_main(pos));
             imageView.setScaleType(scaleType);
-            Glide.with(mActivity).load(pic.getUrl()).apply(new RequestOptions().dontAnimate()).into(imageView);
+            imageViewLoader.loadImageView(imageView, url);
 
             relativeLayout.addView(imageView);
-            if(!TextUtils.isEmpty(pic.getTitle())){
+            if(!TextUtils.isEmpty(title)){
                 relativeLayout.addView(textView);
             }
 
@@ -129,7 +135,9 @@ public class ImageGlarryDrawable {
         } else if (mList.size() == 1) {//如果只有一个或没有,就隐藏Group
             mRadioGroup.setVisibility(View.GONE);
         } else {//说明是空的。
-            mViewPager.setBackgroundColor(mActivity.getResources().getColor(R.color.white));
+            if(isSetBackGround) {
+                mViewPager.setBackgroundColor(mActivity.getResources().getColor(R.color.white));
+            }
             return this;
         }
 
@@ -290,4 +298,23 @@ public class ImageGlarryDrawable {
         if(pagerAdapter != null)
             pagerAdapter.notifyDataSetChanged();
     }
+
+    private ImageViewLoader imageViewLoader = new ImageViewLoader() {
+
+        @Override
+        public void loadImageView(ImageView imageView, String url) {
+            Glide.with(imageView.getContext()).load(url).apply(new RequestOptions().dontAnimate()).into(imageView);
+        }
+    };
+
+    public void setImageViewLoader(ImageViewLoader imageViewLoader) {
+        this.imageViewLoader = imageViewLoader;
+    }
+    public interface ImageViewLoader{
+        void loadImageView(ImageView imageView, String url);
+    }
+
+    public void setSetBackGround(boolean setBackGround) {
+        isSetBackGround = setBackGround;
+    }
 }

+ 74 - 0
app/src/main/java/com/sheep/gamegroup/util/Jump2View.java

@@ -10,6 +10,7 @@ import android.os.Bundle;
 import android.provider.Settings;
 import android.support.v7.app.AlertDialog;
 import android.text.TextUtils;
+import android.view.Gravity;
 import android.view.View;
 
 import com.alibaba.fastjson.JSON;
@@ -24,6 +25,8 @@ import com.sheep.gamegroup.model.entity.Container;
 import com.sheep.gamegroup.model.entity.CreditCard;
 import com.sheep.gamegroup.model.entity.DialogConfig;
 import com.sheep.gamegroup.model.entity.DialogEntity;
+import com.sheep.gamegroup.model.entity.FindApp;
+import com.sheep.gamegroup.model.entity.FindItem;
 import com.sheep.gamegroup.model.entity.NewbieTask;
 import com.sheep.gamegroup.model.entity.NewbieTaskRecord;
 import com.sheep.gamegroup.model.entity.TaskAcceptedEty;
@@ -37,6 +40,8 @@ import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.view.activity.AccountAndSecurityAct;
 import com.sheep.gamegroup.view.activity.ActCreditCardTaskList;
 import com.sheep.gamegroup.view.activity.ActCreditCardWeb;
+import com.sheep.gamegroup.view.activity.ActFindGame;
+import com.sheep.gamegroup.view.activity.ActFindInformation;
 import com.sheep.gamegroup.view.activity.ActGuide;
 import com.sheep.gamegroup.view.activity.ActGuideDeblocked;
 import com.sheep.gamegroup.view.activity.ActGuideOnHook;
@@ -46,6 +51,7 @@ import com.sheep.gamegroup.view.activity.ActMyMoney;
 import com.sheep.gamegroup.view.activity.ActNewAboutUs;
 import com.sheep.gamegroup.view.activity.ActNewbieTaskList;
 import com.sheep.gamegroup.view.activity.ActNotice;
+import com.sheep.gamegroup.view.activity.ActReservation;
 import com.sheep.gamegroup.view.activity.ActUnderstandSheep;
 import com.sheep.gamegroup.view.activity.ActUserLabelList;
 import com.sheep.gamegroup.view.activity.ActWeb;
@@ -1184,6 +1190,35 @@ public class Jump2View {
                     @Override
                     public void onError(BaseMessage baseMessage) {
                         LogUtil.println("baseMessage onError " + JSON.toJSONString(baseMessage));
+                        tryShowReservation(activity);
+                    }
+                });
+    }
+    public void tryShowReservation(final Activity activity) {
+        SheepApp.getInstance().getNetComponent().getApiService().getFindAppDownloadsStatus()
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(activity) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onNext " + JSON.toJSONString(baseMessage));
+                        if(baseMessage.getData() instanceof Integer){
+                            if((int)baseMessage.getData() > 0){//该提示在弹窗广告后显示,且必须有可下载的游戏,弹出弹窗
+                                ViewUtil.showMsgDialog(activity, new DialogConfig().setTitle("预约下载提示")
+                                        .setMsg("你有可下载的预约游戏请及时下载,不要错过优先时机哦。").setMsgGravity(Gravity.START)
+                                        .setBtnLeftText("去下载").setBtnLeftOnClickListener(new View.OnClickListener() {
+                                            @Override
+                                            public void onClick(View view) {
+                                                goActReservation(activity);//点击去下载到游戏预约列表
+                                            }
+                                        }).setBtnRightText("我知道了"));
+                            }
+                        }
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onError " + JSON.toJSONString(baseMessage));
                     }
                 });
     }
@@ -1308,4 +1343,43 @@ public class Jump2View {
                 });
         UMConfigUtils.onEvent(UMConfigUtils.Event.XIANWAN_WEBVIEW);
     }
+
+    /**
+     * 发现模块--游戏详情界面
+     * @param activity
+     * @param item
+     */
+    public void goFindGame(Activity activity, Object item) {
+        Intent intent = new Intent(activity, ActFindGame.class);
+        int applicationId = 0;
+        if(item instanceof FindItem){
+            applicationId = ((FindItem) item).getApplication_id();
+        } else if(item instanceof FindApp){
+            applicationId = ((FindApp) item).getId();
+        } else if(item instanceof Integer){
+            applicationId = (int) item;
+        }
+        intent.putExtra("id", applicationId);
+        activity.startActivity(intent);
+    }
+    /**
+     * 发现模块--资讯详情界面
+     * @param activity
+     * @param item
+     */
+    public void goFindInformation(Activity activity, FindItem item) {
+        Intent intent = new Intent(activity, ActFindInformation.class);
+        intent.putExtra("id", item.getId());
+        intent.putExtra("title", item.getTitle());
+        activity.startActivity(intent);
+    }
+
+    /**
+     * 进入游戏预约列表界面
+     * @param activity
+     */
+    public void goActReservation(Activity activity) {
+        Intent intent = new Intent(activity, ActReservation.class);
+        activity.startActivity(intent);
+    }
 }

+ 19 - 0
app/src/main/java/com/sheep/gamegroup/util/ListUtil.java

@@ -35,6 +35,25 @@ public class ListUtil {
         return new ArrayList<>();
     }
 
+    public static <R,V> int addAll(Conversion<R, V> conversion, List<V> list, R...elements) {
+        int length = elements.length;
+        for (int i = 0; i < length; i++) {
+            V v = conversion.convert(elements[i], i);
+            list.add(v);
+        }
+        return length;
+    }
+    public static <R,V> int addAll(Conversion<R, V> conversion, List<V> list, List<R> elements) {
+        int size = elements.size();
+        for (int i = 0; i < elements.size(); i++) {
+            V v = conversion.convert(elements.get(i), i);
+            list.add(v);
+        }
+        return size;
+    }
+    public static <T> int addAll(List<T> list, T...elements) {
+        return addAll(list, asList(elements));
+    }
     public static <T> int addAll(List<T> list, List<? extends T> elements) {
         int count = 0;
         if(list == null){

+ 35 - 2
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -17,7 +17,6 @@ import android.text.method.ScrollingMovementMethod;
 import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.View;
-import android.view.Window;
 import android.view.WindowManager;
 import android.webkit.WebView;
 import android.widget.ImageView;
@@ -26,6 +25,7 @@ import android.widget.TextView;
 import android.widget.VideoView;
 
 import com.bumptech.glide.Glide;
+import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
 import com.bumptech.glide.request.RequestOptions;
 import com.sheep.gamegroup.model.entity.Advertising;
 import com.sheep.gamegroup.model.entity.Container;
@@ -37,6 +37,7 @@ import com.sheep.gamegroup.view.dialog.DialogPayGame;
 import com.sheep.gamegroup.view.dialog.DialogShare;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.ClassFileHelper;
 import com.sheep.jiuyan.samllsheep.utils.G;
 
@@ -332,7 +333,7 @@ public class ViewUtil {
                             if(index < length){
                                 int position = msg.indexOf(key, index);
                                 String start = msg.substring(0, position);
-                                String middle = String.format(Locale.CHINA, "<font color='%s'>%s</font>", value, key);
+                                String middle = getHtmlText(key, value);
                                 String end = msg.substring(position + key.length());
                                 index = (start+middle).length();
                                 msg = start + middle + end;
@@ -455,6 +456,16 @@ public class ViewUtil {
         return dialog;
     }
 
+    /**
+     * 获取html格式并带颜色的文字
+     * @param text 文字
+     * @param color 颜色
+     * @return
+     */
+    public static String getHtmlText(String text, String color) {
+        return String.format(Locale.CHINA, "<font color='%s'>%s</font>", color, text);
+    }
+
 
     public static void showHalfScreenAd(final Activity activity, final Advertising advertising, Container<Action1<Integer>> container) {
         if (activity != null) {
@@ -559,6 +570,7 @@ public class ViewUtil {
                     if (finalTimer != null) {
                         finalTimer.clear();
                     }
+                    Jump2View.getInstance().tryShowReservation(activity);
                 }
             });
             if(TextUtils.isEmpty(advertising.getDesc())) {
@@ -597,6 +609,27 @@ public class ViewUtil {
         new DialogShare(activity, url).showShare();
     }
 
+    public static void setImage(ImageView imageView, String pictures) {
+        if(imageView != null && !TextUtils.isEmpty(pictures)){
+            if(pictures.contains(";")){
+                pictures = pictures.split(";")[0];
+            }
+            GlideImageLoader.setImage(imageView, pictures);
+        }
+    }
+    public static void setImage(ImageView imageView, String pictures, int radius) {
+        if(imageView != null && !TextUtils.isEmpty(pictures)){
+            if(pictures.contains(";")){
+                pictures = pictures.split(";")[0];
+            }
+            GlideImageLoader.roundedCornersImage(imageView, pictures, radius);
+        }
+    }
+    public static void setTextTime(TextView textView, long time, String format) {
+        if(textView != null){
+            textView.setText(TimeUtil.TimeStamp2Date(time, format));
+        }
+    }
     public static void setText(TextView textView) {
         if(textView != null){
             textView.setText("");

+ 431 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/ActFindGame.java

@@ -0,0 +1,431 @@
+package com.sheep.gamegroup.view.activity;
+
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.design.widget.AppBarLayout;
+import android.support.v7.widget.AppCompatRatingBar;
+import android.support.v7.widget.Toolbar;
+import android.text.TextUtils;
+import android.view.Gravity;
+import android.view.View;
+import android.webkit.WebView;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.ProgressBar;
+import android.widget.RadioGroup;
+import android.widget.RatingBar;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.bumptech.glide.Glide;
+import com.bumptech.glide.request.RequestOptions;
+import com.kfzs.duanduan.utils.StatusBarUtils;
+import com.kfzs.duanduan.utils.dlg.HelperUtils;
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.DialogConfig;
+import com.sheep.gamegroup.model.entity.FindApp;
+import com.sheep.gamegroup.model.entity.FindAppScore;
+import com.sheep.gamegroup.model.entity.MyFindAppCore;
+import com.sheep.gamegroup.model.entity.UserEntity;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.Conversion2;
+import com.sheep.gamegroup.util.FindAppHelper;
+import com.sheep.gamegroup.util.GlideImageLoader;
+import com.sheep.gamegroup.util.ImageGlarryDrawable;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.LogUtil;
+import com.sheep.gamegroup.util.TimeUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.customview.SheepViewPager;
+import com.sheep.jiuyan.samllsheep.BuildConfig;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
+
+import java.util.List;
+import java.util.Locale;
+
+import butterknife.BindView;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.functions.Action1;
+import rx.schedulers.Schedulers;
+
+/**
+ * Created by realicing on 2018/5/10.
+ * realicing@sina.com
+ */
+public class ActFindGame extends BaseActivity {
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        StatusBarUtils.setTranslucent(this);
+        super.onCreate(savedInstanceState);
+    }
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.act_find_game;
+    }
+
+    private int id;
+    @Override
+    public void initView() {
+        id = getIntent().getIntExtra("id", 0);
+        TitleBarUtils.getInstance()
+                .setTitle(this,"加载中")
+                .setTitleFinish(this);
+        RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, HelperUtils.BAR_HEIGH);
+        status_height_view.setLayoutParams(params);
+        setSupportActionBar((Toolbar) findViewById(R.id.toolbar_act_game_details));
+        /*
+          标题显示和隐藏的监听
+         */
+        ((AppBarLayout) findViewById(R.id.appbar_act_game_details)).addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() {
+            @Override
+            public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
+                if (Math.abs(verticalOffset) <
+                        appBarLayout.getTotalScrollRange() - HelperUtils.getDpiToPix(20)) {
+                    if (!mIsExpanded) {
+                        mIsExpanded = true;//修改状态标记为展开
+                        txt_baseactivity_title.setVisibility(View.INVISIBLE);
+                        find_game_bar.setVisibility(View.INVISIBLE);
+                        title_bottom_line.setVisibility(View.INVISIBLE);
+                        img_baseactivity_title.setImageLevel(0);
+                    }
+                } else if (Math.abs(verticalOffset) >= appBarLayout.getTotalScrollRange()) {
+                    if (mIsExpanded) {
+                        txt_baseactivity_title.setVisibility(View.VISIBLE);
+                        find_game_bar.setVisibility(View.VISIBLE);
+                        title_bottom_line.setVisibility(View.VISIBLE);
+                        img_baseactivity_title.setImageLevel(1);
+                        mIsExpanded = false;//修改状态标记为折叠
+                    }
+                }
+            }
+        });
+        LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) homepage_item_banner_layout.getLayoutParams();
+        layoutParams.height = G.WIDTH/2;
+        homepage_item_banner_layout.setLayoutParams(layoutParams);
+        bindBanner();
+        resetData();
+        resetAppScoreNum();
+        resetMyAppScore();
+        resetUserInfo();
+    }
+    private boolean mIsExpanded = false;//是否是折叠状态
+
+    @Override
+    public void initListener() {
+
+    }
+    @Override
+    public void initData() {
+        showProgress();
+        resetData();
+        SheepApp.getInstance().getNetComponent().getApiService().getAppDetail(id)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(this) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onNext "+ JSON.toJSONString(baseMessage));
+                        FindApp findApp = baseMessage.getData(FindApp.class);
+                        if(findApp != null){
+                            loadData(findApp);
+                            initAppScoreNum();
+                            initMyAppScore();
+                        } else {
+                            resetData();
+                        }
+                        hideProgress();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
+                        G.showToast(baseMessage);
+                        resetData();
+                        hideProgress();
+                    }
+                });
+        CommonUtil.getInstance().updateUserInfo(new Action1<UserEntity>() {
+            @Override
+            public void call(UserEntity userEntity) {
+                if(userEntity != null){
+                    loadUserInfo(userEntity);
+                } else {
+                    resetUserInfo();
+                }
+            }
+        });
+    }
+
+    private void initAppScoreNum() {
+        SheepApp.getInstance().getNetComponent().getApiService().getAppScoreNum(id)
+                        .subscribeOn(Schedulers.io())
+                        .observeOn(AndroidSchedulers.mainThread())
+                        .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                            @Override
+                            public void onNext(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
+                                List<FindAppScore> findAppScoreList = baseMessage.getDataList(FindAppScore.class);
+                                if(ListUtil.isEmpty(findAppScoreList))
+                                    resetAppScoreNum();
+                                else
+                                    loadAppScoreNum(findAppScoreList);
+                            }
+
+                            @Override
+                            public void onError(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
+                                G.showToast(baseMessage);
+                            }
+                        });
+    }
+    private void initMyAppScore() {
+        SheepApp.getInstance().getNetComponent().getApiService().getMyAppScore(id)
+                        .subscribeOn(Schedulers.io())
+                        .observeOn(AndroidSchedulers.mainThread())
+                        .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                            @Override
+                            public void onNext(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
+                                MyFindAppCore myFindAppCore = baseMessage.getData(MyFindAppCore.class);
+                                if(myFindAppCore == null)
+                                    resetMyAppScore();
+                                else
+                                    loadMyAppScore(myFindAppCore);
+                            }
+
+                            @Override
+                            public void onError(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
+                            }
+                        });
+    }
+
+    @BindView(R.id.find_game_iv)
+    ImageView find_game_iv;
+    @BindView(R.id.find_game_bar)
+    View find_game_bar;
+    @BindView(R.id.title_bottom_line)
+    View title_bottom_line;
+    @BindView(R.id.img_baseactivity_title)
+    ImageView img_baseactivity_title;
+    @BindView(R.id.txt_baseactivity_title)
+    View txt_baseactivity_title;
+    @BindView(R.id.status_height_view)
+    View status_height_view;
+
+    //游戏banner图片
+    @BindView(R.id.viewpager_banner)
+    SheepViewPager viewpager_banner;
+    @BindView(R.id.group_banner)
+    RadioGroup group_banner;
+    private List<String> pictureList = ListUtil.emptyList();
+    private ImageGlarryDrawable<String> mImageGlarryStr;
+
+    private Conversion2<String, String, String> conversion2 = new Conversion2<String, String, String>() {
+        @Override
+        public String convert1(String title, int position) {
+            return BuildConfig.DEBUG ? "这里图片的比例为2:1" : null;
+        }
+
+        @Override
+        public String convert2(String url, int position) {
+            return url;
+        }
+    };
+    @BindView(R.id.homepage_item_banner_layout)
+    RelativeLayout homepage_item_banner_layout;
+    private void bindBanner() {
+        homepage_item_banner_layout.setVisibility(View.VISIBLE);
+        if (mImageGlarryStr != null) {
+            mImageGlarryStr.init(pictureList, ImageView.ScaleType.CENTER_CROP, conversion2);
+            mImageGlarryStr.notifyDataSetChanged();
+            return;
+        }
+        mImageGlarryStr = new ImageGlarryDrawable<>(this, viewpager_banner, group_banner);
+        mImageGlarryStr.setSetBackGround(false);
+        final int radius = getResources().getDimensionPixelSize(R.dimen.dp_10);
+        mImageGlarryStr.setImageViewLoader(new ImageGlarryDrawable.ImageViewLoader() {
+            @Override
+            public void loadImageView(ImageView imageView, String url) {
+                ViewUtil.setImage(imageView, url, radius);
+            }
+        });
+        mImageGlarryStr.init(pictureList, ImageView.ScaleType.CENTER_CROP, conversion2);
+    }
+    //游戏简介与下载
+    @BindView(R.id.find_game_name_tv)
+    TextView find_game_name_tv;
+    @BindView(R.id.find_game_info_tv)
+    TextView find_game_info_tv;
+    @BindView(R.id.find_game_xin)
+    RatingBar find_game_xin;
+    @BindView(R.id.find_game_down_tv)
+    TextView find_game_down_tv;
+    private FindAppHelper findAppHelper = new FindAppHelper();
+    private void loadData(final FindApp findApp) {
+        //游戏简介与下载
+        ViewUtil.setImage(find_game_iv, findApp.getIcon());
+        ViewUtil.setText(find_game_name_tv, findApp.getName());
+        final boolean isNeedReservation = !findApp.isCanDonload();//这里认为只有两种状态:可下载与预约下载
+        if(isNeedReservation)
+            ViewUtil.setText(find_game_info_tv, String.format(Locale.CHINA, "开放时间:%s", TimeUtil.TimeStamp2Date(findApp.getDownload_at(), "yyyy-MM-dd\tHH:mm")));
+        else
+            ViewUtil.setText(find_game_info_tv, String.format(Locale.CHINA, "厂商:%s | 版本号:%s\n包体大小:%sM", findApp.getManufacturer(), findApp.getVersions(), findApp.getPackage_size()));
+
+        find_game_xin.setRating(findApp.getScore()/2);
+        findAppHelper.updateView(this, findApp, find_game_down_tv);
+        //游戏图片banner
+        String pictures = findApp.getPictures();
+        if(!TextUtils.isEmpty(pictures) && pictures.contains(";")){
+            pictureList.clear();
+            ListUtil.addAll(pictureList, pictures.split(";"));
+            bindBanner();
+        } else {
+            homepage_item_banner_layout.setVisibility(View.GONE);
+        }
+        //应用评分情况
+        find_game_xin2.setRating(findApp.getScore()/2);
+        ViewUtil.setText(find_game_score, String.format(Locale.CHINA, "%.1f分", findApp.getScore()));
+        int max = Math.max(1, findApp.getScore_count());
+        find_game_progress_1.setMax(max);
+        find_game_progress_2.setMax(max);
+        find_game_progress_3.setMax(max);
+        find_game_progress_4.setMax(max);
+        find_game_progress_5.setMax(max);
+        //游戏介绍
+        loadAppInfo(findApp);
+    }
+
+    private void resetData() {
+        //游戏简介与下载
+        ViewUtil.setText(find_game_name_tv);
+        ViewUtil.setText(find_game_info_tv);
+        ViewUtil.setText(find_game_down_tv);
+        find_game_xin.setRating(0.0f);
+        //应用评分情况
+        find_game_xin2.setRating(0);
+        ViewUtil.setText(find_game_score, "0.0分");
+        //游戏介绍
+    }
+
+    //应用评分情况
+    @BindView(R.id.find_game_xin2)
+    AppCompatRatingBar find_game_xin2;
+    @BindView(R.id.find_game_progress_5)
+    ProgressBar find_game_progress_5;
+    @BindView(R.id.find_game_progress_4)
+    ProgressBar find_game_progress_4;
+    @BindView(R.id.find_game_progress_3)
+    ProgressBar find_game_progress_3;
+    @BindView(R.id.find_game_progress_2)
+    ProgressBar find_game_progress_2;
+    @BindView(R.id.find_game_progress_1)
+    ProgressBar find_game_progress_1;
+    @BindView(R.id.find_game_score)
+    TextView find_game_score;
+
+    private void loadAppScoreNum(List<FindAppScore> findAppScoreList) {
+        for (FindAppScore findAppScore : findAppScoreList) {
+            switch (findAppScore.getStar()){
+                case 1:
+                    find_game_progress_1.setProgress(findAppScore.getNum());
+                    break;
+                case 2:
+                    find_game_progress_2.setProgress(findAppScore.getNum());
+                    break;
+                case 3:
+                    find_game_progress_3.setProgress(findAppScore.getNum());
+                    break;
+                case 4:
+                    find_game_progress_4.setProgress(findAppScore.getNum());
+                    break;
+                case 5:
+                    find_game_progress_5.setProgress(findAppScore.getNum());
+                    break;
+            }
+        }
+    }
+    private void resetAppScoreNum() {
+    }
+
+    //用户信息与提交评分
+    @BindView(R.id.find_game_user_iv)
+    ImageView find_game_user_iv;
+    @BindView(R.id.find_game_user_name_tv)
+    TextView find_game_user_name_tv;
+    @BindView(R.id.find_game_user_xin)
+    AppCompatRatingBar find_game_user_xin;
+    @BindView(R.id.find_game_user_commit_tv)
+    TextView find_game_user_commit_tv;
+
+    private void loadUserInfo(final UserEntity userEntity) {
+        GlideImageLoader.circleImage(find_game_user_iv, userEntity.getAvatar());
+        ViewUtil.setText(find_game_user_name_tv, userEntity.getNickname());
+        find_game_user_commit_tv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                commitMyAppScore((int) (find_game_user_xin.getRating()*2));
+            }
+        });
+    }
+    private void loadMyAppScore(MyFindAppCore myFindAppCore) {
+        find_game_user_xin.setRating(myFindAppCore.getScore()/2);
+        find_game_user_commit_tv.setText("重新评分");
+    }
+    /**
+     *
+     "application_id": 0,
+     "score": 0,
+     * @param score 要提交的分数
+     */
+    private void commitMyAppScore(int score) {
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("application_id", id);
+        jsonObject.put("score",score );
+        SheepApp.getInstance().getNetComponent().getApiService().commitAppScore(jsonObject)
+                        .subscribeOn(Schedulers.io())
+                        .observeOn(AndroidSchedulers.mainThread())
+                        .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                            @Override
+                            public void onNext(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
+                                find_game_user_commit_tv.setText("重新评分");
+                                G.showToast(baseMessage);
+                                //更新评分与我的评分
+                                initAppScoreNum();
+                                initMyAppScore();
+                            }
+
+                            @Override
+                            public void onError(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
+                                G.showToast(baseMessage);
+                            }
+                        });
+    }
+
+    private void resetUserInfo() {
+        ViewUtil.setText(find_game_user_name_tv);
+    }
+
+    private void resetMyAppScore() {
+        find_game_user_xin.setRating(0.0f);
+    }
+    //游戏介绍
+    @BindView(R.id.find_game_info_wv)
+    WebView find_game_info_wv;
+
+    private void loadAppInfo(final FindApp findApp) {
+        ViewUtil.loadDataWithBaseURL(find_game_info_wv, findApp.getIntro());
+    }
+
+
+}

+ 325 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/ActFindInformation.java

@@ -0,0 +1,325 @@
+package com.sheep.gamegroup.view.activity;
+
+import android.support.v4.widget.SwipeRefreshLayout;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.TextUtils;
+import android.view.View;
+import android.view.ViewGroup;
+import android.webkit.WebView;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.FindApp;
+import com.sheep.gamegroup.model.entity.FindItem;
+import com.sheep.gamegroup.model.entity.TaskAcceptedEty;
+import com.sheep.gamegroup.model.entity.TaskEty;
+import com.sheep.gamegroup.model.entity.TaskReleaseEty;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.FindAppHelper;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.LogUtil;
+import com.sheep.gamegroup.util.SysAppUtil;
+import com.sheep.gamegroup.util.TimeUtil;
+import com.sheep.gamegroup.util.ViewHolder;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.AdbCommonRecycler;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
+
+import java.util.List;
+import java.util.Locale;
+
+import butterknife.BindView;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.functions.Action1;
+import rx.schedulers.Schedulers;
+
+/**
+ * Created by realicing on 2018/5/10.
+ * realicing@sina.com
+ */
+public class ActFindInformation extends BaseActivity {
+    @Override
+    protected int getLayoutId() {
+        return R.layout.net_empty_fresh_list;
+    }
+
+    private int id;
+
+    @BindView(R.id.refresh)
+    SwipeRefreshLayout refresh;
+    @BindView(R.id.empty_view)
+    View empty_view;
+    @BindView(R.id.check_net_ll)
+    View check_net_ll;
+    @BindView(R.id.view_list)
+    RecyclerView view_list;
+    @Override
+    public void initView() {
+        id = getIntent().getIntExtra("id", 0);
+        String title = getIntent().getStringExtra("title");
+
+        TitleBarUtils.getInstance()
+                .setTitle(this, TextUtils.isEmpty(title) ? "详情" : title)
+                .setTitleFinish(this)
+                .setRightImgBotton(this, R.mipmap.share, new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        G.showToast("您点击了分享");
+                    }
+                });
+
+        refresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
+            @Override
+            public void onRefresh() {
+                initData();
+                refresh.setRefreshing(false);
+            }
+        });
+
+        view_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
+        view_list.setAdapter(new AdbCommonRecycler<String>(SheepApp.getInstance(), list){
+
+            @Override
+            public int getItemViewType(int position) {
+                return position;
+            }
+            @Override
+            public int getViewIdByType(int type) {//type来源于 getItemViewType 返回的值
+                String item = list.get(type);
+                switch (item){
+                    case "top":
+                        return R.layout.find_information_top;
+                    case "bottom":
+                    default:
+                        return R.layout.find_information_bottom;
+                }
+            }
+
+            @Override
+            public void convert(ViewHolder holder, final String item) {
+                switch (item){
+                    case "top":
+                        loadTop(holder.itemView);
+                        break;
+                    default:
+                        loadBottom((ViewGroup) holder.itemView);
+                        break;
+                }
+            }});
+    }
+
+    private void loadTop(View itemView) {
+        TextView find_information_name = (TextView)itemView.findViewById(R.id.find_information_name);
+        TextView find_information_time = (TextView)itemView.findViewById(R.id.find_information_time);
+        TextView find_information_look = (TextView)itemView.findViewById(R.id.find_information_look);
+        ViewUtil.setText(find_information_name, findItem.getTitle());
+        ViewUtil.setText(find_information_time, String.format(Locale.CHINA, "发布时间:%s", TimeUtil.TimeStamp2Date(findItem.getCreated_at(), "yyyy-MM-dd\tHH:mm")));
+        ViewUtil.setText(find_information_look, findItem.getClicks());
+
+        WebView find_information_content_wb = itemView.findViewById(R.id.find_information_content_wb);
+        ViewUtil.loadDataWithBaseURL(find_information_content_wb, findItem.getContent());
+
+    }
+    private void loadBottom(ViewGroup viewGroup) {
+        if(taskReleaseEty != null && taskReleaseEty.getTask() != null) {
+            loadTask(viewGroup.getChildAt(0));
+        } else {
+            viewGroup.getChildAt(0).setVisibility(View.GONE);
+        }
+        viewGroup.getChildAt(1).setVisibility(taskReleaseEty != null && taskReleaseEty.getTask() != null && findApp != null ? View.VISIBLE : View.GONE);
+        if(findApp != null) {
+            loadGame(viewGroup.getChildAt(2));
+        } else {
+            viewGroup.getChildAt(2).setVisibility(View.GONE);
+        }
+    }
+
+    private void loadTask(View itemView) {
+        itemView.setVisibility(View.VISIBLE);
+        final TaskEty taskEty = taskReleaseEty.getTask();
+        ImageView find_information_game_icon = (ImageView)itemView.findViewById(R.id.find_information_game_icon);
+        TextView find_information_game_name = (TextView)itemView.findViewById(R.id.find_information_game_name);
+        TextView find_information_game_surplus = (TextView)itemView.findViewById(R.id.find_information_game_surplus);
+        TextView find_information_game_time = (TextView)itemView.findViewById(R.id.find_information_game_time);
+        TextView find_information_game_yuan = (TextView)itemView.findViewById(R.id.find_information_game_yuan);
+        TextView find_information_game_task = (TextView)itemView.findViewById(R.id.find_information_game_task);
+        ViewUtil.setImage(find_information_game_icon, taskEty.getIcon());
+        ViewUtil.setText(find_information_game_name, taskEty.getName());
+        ViewUtil.setText(find_information_game_surplus, String.format(Locale.CHINA, "剩余%s份", taskReleaseEty.getLast_num()));
+        ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "截止日期:%s", TimeUtil.TimeStamp2Date(findItem.getCreated_at(), "yyyy/MM/dd\tHH:mm")));
+        ViewUtil.setText(find_information_game_yuan, String.format(Locale.CHINA, "+%s元", taskReleaseEty.getBonus()));
+        find_information_game_yuan.setVisibility(View.VISIBLE);
+        find_information_game_task.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                G.showToast("点击接受任务");
+            }
+        });
+
+        itemView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                Jump2View.getInstance().goTaskDetailView(ActFindInformation.this, findItem.getRelease_task_id());
+            }
+        });
+    }
+    private FindAppHelper findAppHelper = new FindAppHelper();
+    private void loadGame(View itemView) {
+        itemView.setVisibility(View.VISIBLE);
+        ImageView find_information_game_icon = (ImageView)itemView.findViewById(R.id.find_information_game_icon);
+        TextView find_information_game_name = (TextView)itemView.findViewById(R.id.find_information_game_name);
+        TextView find_information_game_surplus = (TextView)itemView.findViewById(R.id.find_information_game_surplus);
+        TextView find_information_game_time = (TextView)itemView.findViewById(R.id.find_information_game_time);
+        TextView find_information_game_yuan = (TextView)itemView.findViewById(R.id.find_information_game_yuan);
+        TextView find_information_game_task = (TextView)itemView.findViewById(R.id.find_information_game_task);
+        ViewUtil.setImage(find_information_game_icon, findApp.getIcon());
+        ViewUtil.setText(find_information_game_name, findApp.getName());
+        final boolean isNeedReservation = !findApp.isCanDonload();//这里认为只有两种状态:可下载与预约下载
+        ViewUtil.setText(find_information_game_surplus);
+        if(isNeedReservation)
+            ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "开放时间:%s", TimeUtil.TimeStamp2Date(findApp.getDownload_at(), "yyyy-MM-dd\tHH:mm")));
+        else
+            ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "厂商:%s \n包体大小:%sM", findApp.getManufacturer(),findApp.getPackage_size()));
+//        ViewUtil.setText(find_information_game_surplus, String.format(Locale.CHINA, "厂商:%s", findApp.getManufacturer()));
+//        ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "包体大小:%sM", findApp.getPackage_size()));
+        find_information_game_yuan.setVisibility(View.GONE);
+        findAppHelper.updateView(this, findApp, find_information_game_task);
+
+        itemView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                Jump2View.getInstance().goFindGame(ActFindInformation.this, findItem);
+            }
+        });
+    }
+
+    @Override
+    public void initListener() {
+
+    }
+
+    private List<String> list = ListUtil.emptyList();
+    @Override
+    public void initData() {
+        empty_view.setVisibility(View.INVISIBLE);
+        SysAppUtil.checkNet(new Action1<Integer>() {
+            @Override
+            public void call(Integer result) {
+                if(result != 0){//无网络
+                    if(check_net_ll != null)
+                        check_net_ll.setVisibility(View.VISIBLE);
+                } else {
+                    if(check_net_ll != null)
+                        check_net_ll.setVisibility(View.GONE);
+                }
+            }
+        });
+        SheepApp.getInstance().getNetComponent().getApiService().getFindDetail(id)
+                        .subscribeOn(Schedulers.io())
+                        .observeOn(AndroidSchedulers.mainThread())
+                        .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                            @Override
+                            public void onNext(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onNext "+ JSON.toJSONString(baseMessage));
+                                FindItem data = baseMessage.getData(FindItem.class);
+                                if(data != null){
+                                    findItem = data;
+                                    list.clear();
+                                    list.add("top");
+                                    list.add("bottom");
+                                    notifyDataSetChanged();
+                                    if(findItem.getRelease_task_id() != 0){//包含任务
+                                        initTask(findItem.getRelease_task_id());
+//                                        initAcceptedTask(findItem.getRelease_task_id());
+                                    }
+                                    if(findItem.getApplication_id() != 0){//包含游戏
+                                        initFindApp(findItem.getApplication_id());
+                                    }
+                                }
+                            }
+
+                            @Override
+                            public void onError(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
+                                notifyDataSetChanged();
+                            }
+                        });
+    }
+
+    private FindApp findApp;
+    private void initFindApp(int application_id) {
+        SheepApp.getInstance().getNetComponent().getApiService().getAppDetail(application_id)
+                        .subscribeOn(Schedulers.io())
+                        .observeOn(AndroidSchedulers.mainThread())
+                        .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                            @Override
+                            public void onNext(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
+                                findApp = baseMessage.getData(FindApp.class);
+                                notifyDataSetChanged();
+                            }
+
+                            @Override
+                            public void onError(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
+                                G.showToast(baseMessage);
+                            }
+                        });
+    }
+//    private TaskAcceptedEty taskAcceptedEty;
+//    private void initAcceptedTask(final int release_task_id) {
+//        SheepApp.getInstance().getNetComponent().getApiService().getAcceptedTaskDetail(release_task_id)
+//                        .subscribeOn(Schedulers.io())
+//                        .observeOn(AndroidSchedulers.mainThread())
+//                        .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+//                            @Override
+//                            public void onNext(BaseMessage baseMessage) {
+//                                LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
+//                                taskAcceptedEty = baseMessage.getData(TaskAcceptedEty.class);
+//                                initTask(release_task_id);
+//                            }
+//
+//                            @Override
+//                            public void onError(BaseMessage baseMessage) {
+//                                LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
+//                            }
+//                        });
+//    }
+    private TaskReleaseEty taskReleaseEty;
+    private void initTask(int release_task_id) {
+        SheepApp.getInstance().getNetComponent().getApiService().taskDesc(release_task_id)
+                        .subscribeOn(Schedulers.io())
+                        .observeOn(AndroidSchedulers.mainThread())
+                        .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                            @Override
+                            public void onNext(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
+                                taskReleaseEty = baseMessage.getData(TaskReleaseEty.class);
+                                notifyDataSetChanged();
+
+                            }
+
+                            @Override
+                            public void onError(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
+                            }
+                        });
+    }
+
+    private FindItem findItem;
+
+    private void notifyDataSetChanged(){
+        if(list.isEmpty())
+            empty_view.setVisibility(View.VISIBLE);
+        refresh.setRefreshing(false);
+        view_list.getAdapter().notifyDataSetChanged();
+    }
+}

+ 2 - 2
app/src/main/java/com/sheep/gamegroup/view/activity/ActLoadH5.java

@@ -69,10 +69,10 @@ public class ActLoadH5 extends BaseActivity {
         } else {
             act_notice_content_wb.setVisibility(View.GONE);
             String[] items = content.split("\n");
-            StringBuilder stringBuilder = new StringBuilder("\t\t\t\t");
+            StringBuilder stringBuilder = new StringBuilder("\u3000\u3000");
             for (int i = 0; i < items.length; i++) {
                 if (i != 0)
-                    stringBuilder.append("\n\t\t\t\t");
+                    stringBuilder.append("\n\u3000\u3000");
                 stringBuilder.append(items[i]);
             }
             act_notice_content_tv.setText(stringBuilder.toString());

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/ActNewAboutUs.java

@@ -55,7 +55,7 @@ public class ActNewAboutUs extends BaseActivity {
                 .setTitleFinish(this);
         RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, HelperUtils.BAR_HEIGH);
         status_height_view.setLayoutParams(params);
-        GlideImageLoader.displayImage(this, about_us_iv, "http://cdngame.kuaifazs.com/icon_phone.png");
+        GlideImageLoader.centerImage(about_us_iv, "http://cdngame.kuaifazs.com/icon_phone.png");
         setSupportActionBar((Toolbar) findViewById(R.id.toolbar_act_game_details));
         /*
           标题显示和隐藏的监听

+ 255 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/ActReservation.java

@@ -0,0 +1,255 @@
+package com.sheep.gamegroup.view.activity;
+
+import android.support.v4.widget.SwipeRefreshLayout;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.FindApp;
+import com.sheep.gamegroup.model.entity.FindAppReservation;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.LogUtil;
+import com.sheep.gamegroup.util.SysAppUtil;
+import com.sheep.gamegroup.util.TimeUtil;
+import com.sheep.gamegroup.util.ViewHolder;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.AdbCommonRecycler;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
+
+import java.util.List;
+import java.util.Locale;
+
+import butterknife.BindView;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.functions.Action1;
+import rx.schedulers.Schedulers;
+
+/**
+ * Created by realicing on 2018/5/10.
+ * realicing@sina.com
+ */
+public class ActReservation extends BaseActivity {
+    @Override
+    protected int getLayoutId() {
+        return R.layout.net_empty_fresh_list_not_wrap;
+    }
+
+    @BindView(R.id.refresh)
+    SwipeRefreshLayout refresh;
+    @BindView(R.id.empty_view)
+    View empty_view;
+    @BindView(R.id.check_net_ll)
+    View check_net_ll;
+    @BindView(R.id.view_list)
+    RecyclerView view_list;
+
+    @Override
+    public void initView() {
+        TitleBarUtils.getInstance()
+                .setTitle(this, "游戏预约")
+                .setTitleFinish(this);
+
+        refresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
+            @Override
+            public void onRefresh() {
+                initData();
+                refresh.setRefreshing(false);
+            }
+        });
+
+        view_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
+        view_list.setAdapter(new AdbCommonRecycler<FindAppReservation>(SheepApp.getInstance(), list) {
+
+            @Override
+            public int getItemViewType(int position) {
+                return position;
+            }
+
+            @Override
+            public int getViewIdByType(int type) {//type来源于 getItemViewType 返回的值
+                switch (type) {
+                    case 0:
+                        return R.layout.find_reservation_item_top;
+                    default:
+                        if(type + 1 == list.size())
+                            return R.layout.find_reservation_item_bottom;
+                        else
+                            return R.layout.find_reservation_item_center;
+                }
+            }
+
+            @Override
+            public void convert(ViewHolder holder, FindAppReservation item) {
+                if(item != null)
+                    loadItem(holder.itemView, item);
+            }
+        });
+    }
+
+    private void loadItem(View itemView, final FindAppReservation item) {
+        ImageView find_information_game_icon = (ImageView) itemView.findViewById(R.id.find_information_game_icon);
+        TextView find_information_game_name = (TextView) itemView.findViewById(R.id.find_information_game_name);
+        TextView find_information_game_time = (TextView) itemView.findViewById(R.id.find_information_game_time);
+        TextView find_information_game_bt1 = (TextView) itemView.findViewById(R.id.find_information_game_bt1);
+        final TextView find_information_game_bt2 = (TextView) itemView.findViewById(R.id.find_information_game_bt2);
+
+        if(item != null && item.getApplication() != null){
+            final FindApp findApp = item.getApplication();
+
+            ViewUtil.setImage(find_information_game_icon, findApp.getIcon());
+            ViewUtil.setText(find_information_game_name, findApp.getName());
+            ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "开放时间:%s", TimeUtil.TimeStamp2Date(findApp.getDownload_at(), "yyyy-MM-dd\tHH:mm")));
+            if(findApp.isCanDonload()){//可以下载
+                find_information_game_bt1.setEnabled(true);
+                find_information_game_bt1.setText("立即下载");
+                find_information_game_bt1.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        G.showToast("点击立即下载");
+                    }
+                });
+
+                find_information_game_bt2.setEnabled(false);
+            } else {
+                find_information_game_bt1.setEnabled(false);
+                find_information_game_bt1.setText("即将开始");
+
+                find_information_game_bt2.setEnabled(true);
+                find_information_game_bt2.setText(item.isCancel() ? "立即预约" : "取消预约");
+                find_information_game_bt2.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        find_information_game_bt2.setEnabled(false);
+                        if(item.isCancel()){//已经取消预约则进行预约
+                            commitAppDownloads(find_information_game_bt2, findApp.getId());
+                        } else {//取消预约
+                            deleteDownloads(find_information_game_bt2, item.getId());
+                        }
+                    }
+                });
+            }
+            itemView.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View view) {
+                    Jump2View.getInstance().goFindGame(ActReservation.this, findApp);
+                }
+            });
+        } else {
+
+            ViewUtil.setText(find_information_game_name);
+            ViewUtil.setText(find_information_game_time);
+            find_information_game_bt1.setEnabled(false);
+            find_information_game_bt2.setEnabled(false);
+        }
+    }
+
+    //预约下载
+    private void commitAppDownloads(final TextView find_information_game_bt2, int id) {
+        SheepApp.getInstance().getNetComponent().getApiService().getDownloads(id)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
+                        find_information_game_bt2.setEnabled(true);
+                        find_information_game_bt2.setText("取消预约");
+                        G.showToast("预约成功");
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
+                        G.showToast("预约失败");
+                        find_information_game_bt2.setEnabled(true);
+                    }
+                });
+    }
+    //取消预约
+    private void deleteDownloads(final TextView find_information_game_bt2, int id) {
+        SheepApp.getInstance().getNetComponent().getApiService().deleteDownloads(id)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
+                        find_information_game_bt2.setEnabled(true);
+                        find_information_game_bt2.setText("立即预约");
+                        G.showToast("取消预约成功");
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
+                        G.showToast("取消预约失败");
+                        find_information_game_bt2.setEnabled(true);
+                    }
+                });
+    }
+    @Override
+    public void initListener() {
+
+    }
+
+    private List<FindAppReservation> list = ListUtil.emptyList();
+
+    @Override
+    public void initData() {
+        empty_view.setVisibility(View.INVISIBLE);
+        SysAppUtil.checkNet(new Action1<Integer>() {
+            @Override
+            public void call(Integer result) {
+                if (result != 0) {//无网络
+                    if (check_net_ll != null)
+                        check_net_ll.setVisibility(View.VISIBLE);
+                } else {
+                    if (check_net_ll != null)
+                        check_net_ll.setVisibility(View.GONE);
+                }
+            }
+        });
+        SheepApp.getInstance().getNetComponent().getApiService().getFindAppReservationList(1, 100)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onNext " + JSON.toJSONString(baseMessage));
+                        List<FindAppReservation> newList = baseMessage.getDataList(FindAppReservation.class);
+                        if (ListUtil.isEmpty(newList)) {
+                        } else {
+                            list.clear();
+                            ListUtil.addAll(list, newList);
+                            if(!list.isEmpty())
+                                list.add(null);//底部圆角
+                            notifyDataSetChanged();
+                        }
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onError " + JSON.toJSONString(baseMessage));
+                        notifyDataSetChanged();
+                    }
+                });
+    }
+
+
+    private void notifyDataSetChanged() {
+        if (list.isEmpty())
+            empty_view.setVisibility(View.VISIBLE);
+        refresh.setRefreshing(false);
+        view_list.getAdapter().notifyDataSetChanged();
+    }
+}

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/PersionInfoAct.java

@@ -157,7 +157,7 @@ public class PersionInfoAct extends AbsChooseImageActivity {
 
     @Override
     protected void onGetImage(String path) {
-        GlideImageLoader.displayImage(this, ivHeadRight, path, R.drawable.icon);
+        GlideImageLoader.circleImage(ivHeadRight, path, R.drawable.icon);
     }
 
     @Override

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/PhoneAct.java

@@ -92,7 +92,7 @@ public class PhoneAct extends BaseActivity implements PhoneContract.View {
             phoneEtAccount.setInputType(InputType.TYPE_CLASS_TEXT);
             phoneEtAccount.setFilters(new InputFilter[]{new InputFilter.LengthFilter(40)});
         }
-        GlideImageLoader.displayImage(this, phone_iv, "http://cdngame.kuaifazs.com/icon_phone.png");
+        GlideImageLoader.centerImage( phone_iv, "http://cdngame.kuaifazs.com/icon_phone.png");
     }
 
     @Override

+ 2 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/TaskDetailAct.java

@@ -34,6 +34,7 @@ import com.kfzs.duanduan.utils.ApkUtils;
 import com.sheep.gamegroup.absBase.AbsChooseImageActivity;
 import com.sheep.gamegroup.di.components.DaggerTaskDetailComponent;
 import com.sheep.gamegroup.di.modules.TaskDetailModule;
+import com.sheep.gamegroup.model.api.ITask;
 import com.sheep.gamegroup.model.entity.AppRecord;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.DialogEntity;
@@ -431,7 +432,7 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
 
     }
 
-    public static void setBtnStr(TaskEty taskEty, DownloadTaskService mDownloadTaskService, Action1<Object> action1) {
+    public static void setBtnStr(ITask taskEty, DownloadTaskService mDownloadTaskService, Action1<Object> action1) {
         boolean isInstalled = PackageUtil.isAppInstalled(SheepApp.getInstance(), taskEty.getPackage_names());
         boolean isExistApk = !TextUtils.isEmpty(PackageUtil.isExistsFile(taskEty.getPackage_names()));
         String buttonStr;

+ 0 - 118
app/src/main/java/com/sheep/gamegroup/view/customview/CustomWebView.java

@@ -1,118 +0,0 @@
-package com.sheep.gamegroup.view.customview;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.view.View;
-import android.webkit.WebSettings;
-import android.webkit.WebView;
-import android.webkit.WebViewClient;
-
-/**
- * 自定义webview
- * 识别二维码
- * Created by ljy on 2018/4/3.
- */
-
-public class CustomWebView extends WebView implements View.OnLongClickListener {
-    private Context context;
-    private LongClickCallBack mCallBack;
-    public CustomWebView(Context context, LongClickCallBack mCallBack) {
-        super(context);
-        this.context = context;
-        this.mCallBack = mCallBack;
-        initSettings();
-    }
-
-    private void initSettings() {
-        // 初始化设置
-        WebSettings mSettings = this.getSettings();
-        mSettings.setJavaScriptEnabled(true);//开启javascript
-        mSettings.setDomStorageEnabled(true);//开启DOM
-        mSettings.setDefaultTextEncodingName("utf-8");//设置字符编码
-        //设置web页面
-        mSettings.setAllowFileAccess(true);//设置支持文件流
-        mSettings.setSupportZoom(true);// 支持缩放
-        mSettings.setBuiltInZoomControls(true);// 支持缩放
-        mSettings.setUseWideViewPort(true);// 调整到适合webview大小
-        mSettings.setLoadWithOverviewMode(true);// 调整到适合webview大小
-        mSettings.setDefaultZoom(WebSettings.ZoomDensity.FAR);// 屏幕自适应网页,如果没有这个,在低分辨率的手机上显示可能会异常
-        mSettings.setRenderPriority(WebSettings.RenderPriority.HIGH);
-        //提高网页加载速度,暂时阻塞图片加载,然后网页加载好了,在进行加载图片
-        mSettings.setBlockNetworkImage(true);
-        mSettings.setAppCacheEnabled(true);//开启缓存机制
-
-        setWebViewClient(new MyWebViewClient());
-        setOnLongClickListener(this);
-    }
-
-    @Override
-    public boolean onLongClick(View v) {
-        // 长按事件监听(注意:需要实现LongClickCallBack接口并传入对象)
-        final HitTestResult htr = getHitTestResult();//获取所点击的内容
-        if (htr.getType() == WebView.HitTestResult.IMAGE_TYPE) {//判断被点击的类型为图片
-            mCallBack.onLongClickCallBack(htr.getExtra());
-        }
-        return false;
-    }
-
-    private class MyWebViewClient extends WebViewClient {
-        /**
-         * 加载过程中 拦截加载的地址url
-         * @param view
-         * @param url  被拦截的url
-         * @return
-         */
-        @Override
-        public boolean shouldOverrideUrlLoading(WebView view, String url) {
-            return super.shouldOverrideUrlLoading(view, url);
-        }
-        /**
-         * 页面加载过程中,加载资源回调的方法
-         * @param view
-         * @param url
-         */
-        @Override
-        public void onLoadResource(WebView view, String url) {
-            super.onLoadResource(view, url);
-        }
-        /**
-         * 页面加载完成回调的方法
-         * @param view
-         * @param url
-         */
-        @Override
-        public void onPageFinished(WebView view, String url) {
-            super.onPageFinished(view, url);
-            // 关闭图片加载阻塞
-            view.getSettings().setBlockNetworkImage(false);
-        }
-        /**
-         * 页面开始加载调用的方法
-         * @param view
-         * @param url
-         * @param favicon
-         */
-        @Override
-        public void onPageStarted(WebView view, String url, Bitmap favicon) {
-            super.onPageStarted(view, url, favicon);
-        }
-        @Override
-        public void onReceivedError(WebView view, int errorCode,                            String description, String failingUrl) {
-            super.onReceivedError(view, errorCode, description, failingUrl);
-        }
-        @Override
-        public void onScaleChanged(WebView view, float oldScale, float newScale) {
-            super.onScaleChanged(view, oldScale, newScale);
-            CustomWebView.this.requestFocus();
-            CustomWebView.this.requestFocusFromTouch();
-        }
-    }
-    /**
-     * 长按事件回调接口,传递图片地址
-     * @author LinZhang
-     */
-    public interface LongClickCallBack{
-        /**用于传递图片地址*/
-        void onLongClickCallBack(String imgUrl);
-    }
-}

+ 29 - 0
app/src/main/java/com/sheep/gamegroup/view/customview/WebViewForScrollView.java

@@ -0,0 +1,29 @@
+package com.sheep.gamegroup.view.customview;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.View;
+import android.webkit.WebView;
+
+/**
+ * WebViewForScrollView
+ */
+public class WebViewForScrollView extends WebView{
+    public WebViewForScrollView(Context context) {
+        super(context);
+    }
+
+    public WebViewForScrollView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public WebViewForScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+    }
+
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        int expandSpec = View.MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
+                View.MeasureSpec.AT_MOST);
+        super.onMeasure(widthMeasureSpec, expandSpec);
+    }
+}

+ 11 - 0
app/src/main/res/color/selector_color_main_tab2.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:state_enabled="false" android:color="@color/main_tab" />
+    <item android:state_activated="true" android:color="@color/main_tab" />
+    <item android:state_focused="true" android:color="@color/main_tab" />
+    <item android:state_checked="true" android:color="@color/main_tab"/>
+    <item android:state_selected="true" android:color="@color/main_tab"/>
+    <item android:state_pressed="true" android:color="@color/main_tab"/>
+    <item android:color="@color/main_tab_activated"/>
+</selector>

BIN
app/src/main/res/drawable-xxhdpi/xin_empty.png


BIN
app/src/main/res/drawable-xxhdpi/xin_full.png


+ 44 - 0
app/src/main/res/drawable/lay_list_progress.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:id="@android:id/background">
+        <shape>
+            <corners android:radius="5dip" />
+            <gradient
+                android:angle="270"
+                android:centerColor="#fff5f5f5"
+                android:centerY="0.75"
+                android:endColor="#fff5f5f5"
+                android:startColor="#fff5f5f5" />
+        </shape>
+    </item>
+
+    <item android:id="@android:id/secondaryProgress">
+        <clip>
+            <shape>
+                <corners android:radius="5dip" />
+                <gradient
+                    android:angle="270"
+                    android:centerColor="#8000ae7c"
+                    android:centerY="0.75"
+                    android:endColor="#a000be7c"
+                    android:startColor="#8000ce7c" />
+            </shape>
+        </clip>
+    </item>
+
+    <item android:id="@android:id/progress">
+        <clip>
+            <shape>
+                <corners android:radius="5dip" />
+                <gradient
+                    android:angle="270"
+                    android:centerColor="#ff00ce7c"
+                    android:centerY="0.75"
+                    android:endColor="#ff00ce7c"
+                    android:startColor="#ff00ce7c" />
+            </shape>
+        </clip>
+    </item>
+
+</layer-list>

+ 14 - 0
app/src/main/res/drawable/lay_list_ratingbar.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item
+        android:id="@android:id/background"
+        android:drawable="@drawable/xin_empty" />
+    <item
+        android:id="@android:id/secondaryProgress"
+        android:drawable="@drawable/xin_empty" />
+    <item
+        android:id="@android:id/progress"
+        android:drawable="@drawable/xin_full" />
+
+</layer-list>

+ 9 - 0
app/src/main/res/drawable/selector_button_full_main2.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+  <item android:state_enabled="false" android:drawable="@drawable/button_full_normal_gray" />
+  <item android:state_focused="true" android:drawable="@drawable/btn_main_stroke_no_check" />
+  <item android:state_checked="true" android:drawable="@drawable/btn_main_stroke_no_check"/>
+  <item android:state_selected="true" android:drawable="@drawable/btn_main_stroke_no_check"/>
+  <item android:state_pressed="true" android:drawable="@drawable/btn_main_stroke_no_check"/>
+  <item android:drawable="@drawable/layer_list_check_rectgangle"/>
+</selector>

+ 452 - 0
app/src/main/res/layout/act_find_game.xml

@@ -0,0 +1,452 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/white_light">
+
+    <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        xmlns:app="http://schemas.android.com/apk/res-auto"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <android.support.design.widget.AppBarLayout
+            android:id="@+id/appbar_act_game_details"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@color/white_light"
+            android:fitsSystemWindows="true">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:gravity="center_horizontal"
+                android:orientation="vertical"
+                android:paddingBottom="@dimen/content_padding_10"
+                android:paddingEnd="@dimen/content_padding_20"
+                android:paddingStart="@dimen/content_padding_20"
+                android:paddingTop="@dimen/status_bar_height"
+                app:expandedTitleTextAppearance="@style/TextAppearance.Design.CollapsingToolbar.Expanded"
+                app:layout_scrollFlags="scroll|exitUntilCollapsed">
+
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="?attr/actionBarSize"
+                    android:gravity="center"
+                    android:text="关于小绵羊"
+                    android:textColor="@color/black_text_deep"
+                    android:textSize="@dimen/text_size_4"
+                    android:visibility="invisible" />
+
+                <ImageView
+                    android:id="@+id/find_game_iv"
+                    android:layout_width="70dp"
+                    android:layout_height="70dp"
+                    android:layout_marginTop="@dimen/content_padding"
+                    android:src="@drawable/loading_01" />
+
+                <TextView
+                    android:id="@+id/find_game_name_tv"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:text="@string/app_name"
+                    android:textColor="@color/title"
+                    android:textSize="16sp" />
+
+                <TextView
+                    android:id="@+id/find_game_info_tv"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:gravity="center"
+                    android:lineSpacingExtra="5dp"
+                    android:text="厂商:网易 | 版本号:7.9"
+                    android:textColor="@color/black_666666"
+                    android:textSize="15sp" />
+
+                <android.support.v7.widget.AppCompatRatingBar
+                    android:id="@+id/find_game_xin"
+                    style="@style/style_rating_bar"
+                    android:layout_width="wrap_content"
+                    android:layout_marginTop="8dp"
+                    android:isIndicator="true"
+                    android:numStars="5"
+                    android:rating="1.5"
+                    android:stepSize="0.5" />
+
+                <TextView
+                    android:id="@+id/find_game_down_tv"
+                    style="@style/style_button_wrap"
+                    android:layout_marginTop="8dp"
+                    android:paddingEnd="40dp"
+                    android:paddingStart="40dp"
+                    android:text="下载" />
+            </LinearLayout>
+
+        </android.support.design.widget.AppBarLayout>
+
+        <android.support.v4.widget.NestedScrollView
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:fillViewport="false"
+            app:layout_behavior="@string/appbar_scrolling_view_behavior">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="vertical">
+
+                <RelativeLayout
+                    android:id="@+id/homepage_item_banner_layout"
+                    android:layout_width="match_parent"
+                    android:layout_height="200dp"
+                    android:layout_margin="@dimen/dp_10">
+
+
+                    <com.sheep.gamegroup.view.customview.SheepViewPager
+                        android:id="@+id/viewpager_banner"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent" />
+
+                    <RadioGroup
+                        android:id="@+id/group_banner"
+                        android:layout_width="match_parent"
+                        android:layout_height="14dp"
+                        android:layout_alignParentBottom="true"
+                        android:layout_marginEnd="@dimen/content_padding_small"
+                        android:gravity="center"
+                        android:orientation="horizontal"
+                        android:paddingTop="4dp" />
+                </RelativeLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="vertical"
+                    android:layout_margin="@dimen/dp_10"
+                    android:padding="@dimen/content_padding_20"
+                    android:background="@drawable/x_shap_shadow_bg_rectgangle_white">
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:gravity="center_vertical"
+                        android:orientation="horizontal">
+
+                        <View
+                            android:layout_width="5dp"
+                            android:layout_height="16dp"
+                            android:background="#2FBCF1" />
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="3dp"
+                            android:text="总评分"
+                            android:textColor="@color/black_6_3"
+                            android:textSize="15sp" />
+
+                        <android.support.v7.widget.AppCompatRatingBar
+                            android:id="@+id/find_game_xin2"
+                            style="@style/style_rating_bar"
+                            android:layout_width="wrap_content"
+                            android:layout_marginStart="10dp"
+                            android:isIndicator="true"
+                            android:numStars="5"
+                            android:rating="1.5"
+                            android:stepSize="0.5" />
+
+                        <TextView
+                            android:id="@+id/find_game_score"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="5dp"
+                            android:text="8.5分"
+                            android:textColor="@color/black_6_3"
+                            android:textSize="15sp" />
+
+                    </LinearLayout>
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:gravity="center_vertical"
+                        android:layout_marginTop="@dimen/dp_10"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="7dp"
+                            android:text="5"
+                            android:textColor="@color/black_6_3"
+                            android:textSize="14sp" />
+                        <ImageView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="5dp"
+                            android:src="@mipmap/xin_ash"/>
+                        <ProgressBar
+                            android:id="@+id/find_game_progress_5"
+                            style="?android:attr/progressBarStyleHorizontal"
+                            android:layout_marginStart="5dp"
+                            android:layout_width="match_parent"
+                            android:layout_height="10dp"
+                            android:max="100"
+                            android:progress="10"
+                            android:visibility="visible"
+                            android:progressDrawable="@drawable/lay_list_progress"/>
+
+                    </LinearLayout>
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:gravity="center_vertical"
+                        android:layout_marginTop="@dimen/dp_10"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="7dp"
+                            android:text="4"
+                            android:textColor="@color/black_6_3"
+                            android:textSize="14sp" />
+                        <ImageView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="5dp"
+                            android:src="@mipmap/xin_ash"/>
+                        <ProgressBar
+                            android:id="@+id/find_game_progress_4"
+                            style="?android:attr/progressBarStyleHorizontal"
+                            android:layout_marginStart="5dp"
+                            android:layout_width="match_parent"
+                            android:layout_height="10dp"
+                            android:max="100"
+                            android:progress="10"
+                            android:visibility="visible"
+                            android:progressDrawable="@drawable/lay_list_progress"/>
+
+                    </LinearLayout>
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:gravity="center_vertical"
+                        android:layout_marginTop="@dimen/dp_10"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="7dp"
+                            android:text="3"
+                            android:textColor="@color/black_6_3"
+                            android:textSize="14sp" />
+                        <ImageView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="5dp"
+                            android:src="@mipmap/xin_ash"/>
+                        <ProgressBar
+                            android:id="@+id/find_game_progress_3"
+                            style="?android:attr/progressBarStyleHorizontal"
+                            android:layout_marginStart="5dp"
+                            android:layout_width="match_parent"
+                            android:layout_height="10dp"
+                            android:max="100"
+                            android:progress="10"
+                            android:visibility="visible"
+                            android:progressDrawable="@drawable/lay_list_progress"/>
+
+                    </LinearLayout>
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:gravity="center_vertical"
+                        android:layout_marginTop="@dimen/dp_10"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="7dp"
+                            android:text="2"
+                            android:textColor="@color/black_6_3"
+                            android:textSize="14sp" />
+                        <ImageView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="5dp"
+                            android:src="@mipmap/xin_ash"/>
+                        <ProgressBar
+                            android:id="@+id/find_game_progress_2"
+                            style="?android:attr/progressBarStyleHorizontal"
+                            android:layout_marginStart="5dp"
+                            android:layout_width="match_parent"
+                            android:layout_height="10dp"
+                            android:max="100"
+                            android:progress="10"
+                            android:visibility="visible"
+                            android:progressDrawable="@drawable/lay_list_progress"/>
+
+                    </LinearLayout>
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:gravity="center_vertical"
+                        android:layout_marginTop="@dimen/dp_10"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="7dp"
+                            android:text="1"
+                            android:textColor="@color/black_6_3"
+                            android:textSize="14sp" />
+                        <ImageView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="5dp"
+                            android:src="@mipmap/xin_ash"/>
+                        <ProgressBar
+                            android:id="@+id/find_game_progress_1"
+                            style="?android:attr/progressBarStyleHorizontal"
+                            android:layout_marginStart="5dp"
+                            android:layout_width="match_parent"
+                            android:layout_height="10dp"
+                            android:max="100"
+                            android:progress="10"
+                            android:visibility="visible"
+                            android:progressDrawable="@drawable/lay_list_progress"/>
+
+                    </LinearLayout>
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:orientation="vertical"
+                    android:layout_margin="@dimen/dp_10"
+                    android:padding="@dimen/content_padding_20"
+                    android:background="@drawable/x_shap_shadow_bg_rectgangle_white">
+
+                    <ImageView
+                        android:id="@+id/find_game_user_iv"
+                        android:layout_width="70dp"
+                        android:layout_height="70dp"
+                        android:src="@drawable/icon"/>
+
+                    <TextView
+                        android:id="@+id/find_game_user_name_tv"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="5dp"
+                        android:text="@string/app_name"
+                        android:textColor="@color/title"
+                        android:textSize="14sp" />
+
+                    <android.support.v7.widget.AppCompatRatingBar
+                        android:id="@+id/find_game_user_xin"
+                        style="@style/style_rating_bar"
+                        android:layout_width="wrap_content"
+                        android:layout_marginTop="8dp"
+                        android:numStars="5"
+                        android:rating="1.5"
+                        android:stepSize="0.5" />
+
+                    <TextView
+                        android:id="@+id/find_game_user_commit_tv"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="5dp"
+                        android:text="提交评分"
+                        android:textColor="#4889fd"
+                        android:textSize="15sp" />
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:layout_margin="@dimen/dp_10"
+                    android:padding="@dimen/content_padding_20"
+                    android:background="@drawable/x_shap_shadow_bg_rectgangle_white">
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:gravity="center_vertical"
+                        android:orientation="horizontal">
+
+                        <View
+                            android:layout_width="5dp"
+                            android:layout_height="16dp"
+                            android:background="#2FBCF1" />
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="3dp"
+                            android:text="游戏介绍"
+                            android:textColor="@color/black_6_3"
+                            android:textSize="15sp" />
+
+                    </LinearLayout>
+                    <WebView
+                        android:id="@+id/find_game_info_wv"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/dp_10"/>
+                </LinearLayout>
+                <include layout="@layout/find_item_bottom"/>
+            </LinearLayout>
+        </android.support.v4.widget.NestedScrollView>
+    </android.support.design.widget.CoordinatorLayout>
+
+    <View
+        android:id="@+id/status_height_view"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/status_bar_height" />
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="?attr/actionBarSize"
+        android:layout_below="@+id/status_height_view">
+
+        <View
+            android:id="@+id/find_game_bar"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@color/white_F9F9F9"
+            android:visibility="invisible" />
+
+        <include
+            layout="@layout/title_bottom_line"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_alignParentBottom="true"
+            android:visibility="invisible" />
+
+        <ImageView
+            android:id="@+id/img_baseactivity_title"
+            android:layout_width="wrap_content"
+            android:layout_height="?attr/actionBarSize"
+            android:gravity="center_vertical"
+            android:paddingEnd="@dimen/content_padding_20"
+            android:paddingStart="@dimen/content_padding_20"
+            android:scaleType="centerInside"
+            android:src="@drawable/narrow_back_black" />
+
+        <TextView
+            android:id="@+id/txt_baseactivity_title"
+            android:layout_width="match_parent"
+            android:layout_height="?attr/actionBarSize"
+            android:gravity="center"
+            android:text="@string/app_name"
+            android:textColor="@color/black_text_deep"
+            android:textSize="@dimen/text_size_4"
+            android:visibility="invisible" />
+    </RelativeLayout>
+</RelativeLayout>

+ 1 - 1
app/src/main/res/layout/act_understand_sheep.xml

@@ -681,7 +681,7 @@
                         android:layout_height="wrap_content"
                         android:layout_marginTop="190dp"
                         android:gravity="center"
-                        android:text="享受额外收益"
+                        android:text="享受额外收益"
                         android:textColor="@color/white"
                         android:textSize="12sp"
                         app:layout_constraintEnd_toEndOf="@+id/understand_sheep_e_tv_1"

+ 5 - 5
app/src/main/res/layout/fgt_find.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:background="@color/bg_gray"
     android:orientation="vertical">
 
@@ -20,12 +20,12 @@
         android:id="@+id/indicator"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        app:tabTextAppearance="@android:style/TextAppearance.Holo.Medium"
-        app:tabIndicatorColor="#4bc1fe"
         app:tabGravity="fill"
+        app:tabIndicatorColor="#4bc1fe"
+        app:tabMode="fixed"
         app:tabSelectedTextColor="#4bc1fe"
-        app:tabTextColor="#444444"
-        app:tabMode="fixed" />
+        app:tabTextAppearance="@android:style/TextAppearance.Holo.Medium"
+        app:tabTextColor="#444444" />
 
     <android.support.v4.view.ViewPager
         android:id="@+id/pager"

+ 0 - 21
app/src/main/res/layout/fgt_find_child.xml

@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@color/bg_gray"
-    android:orientation="vertical">
-
-    <com.sheep.gamegroup.util.SheepSwipeRefreshLayout
-        android:id="@+id/find_refresh"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content">
-        <include
-            layout="@layout/check_net_view"/>
-        <android.support.v7.widget.RecyclerView
-            android:id="@+id/find_list"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1"
-            android:layout_margin="@dimen/content_padding_10"/>
-    </com.sheep.gamegroup.util.SheepSwipeRefreshLayout>
-</LinearLayout>

+ 40 - 0
app/src/main/res/layout/fgt_personalcenter_item_center_two.xml

@@ -9,6 +9,46 @@
     android:layout_marginStart="@dimen/content_padding_15"
     android:layout_marginEnd="@dimen/content_padding_15">
     <RelativeLayout
+        android:id="@+id/reservation_layout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:padding="15dp"
+        android:gravity="center">
+        <ImageView
+            android:id="@+id/reservation_item_icon_iv"
+            android:layout_width="@dimen/content_padding_20"
+            android:layout_height="@dimen/content_padding_20"
+            android:src="@mipmap/personalc_ic_reservation"
+            android:layout_marginRight="12dp"
+            android:layout_centerVertical="true"/>
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="游戏预约"
+            android:lines="1"
+            android:textColor="@color/black"
+            android:textSize="14dp"
+            android:layout_centerVertical="true"
+            android:layout_toEndOf="@+id/reservation_item_icon_iv" />
+        <ImageView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@mipmap/x_ic_next"
+            android:layout_alignParentRight="true"
+            android:layout_marginLeft="12dp"
+            android:layout_centerVertical="true"/>
+
+    </RelativeLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1px"
+        android:background="@color/white_bg_line"
+        android:layout_marginLeft="15dp"
+        android:layout_marginRight="15dp"
+        />
+
+    <RelativeLayout
         android:id="@+id/abourt_us_layout"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"

+ 21 - 0
app/src/main/res/layout/find_information_bottom.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_marginTop="@dimen/content_padding"
+    android:paddingTop="@dimen/content_padding"
+    android:paddingStart="@dimen/content_padding"
+    android:paddingEnd="@dimen/content_padding"
+    android:background="@color/white"
+    android:orientation="vertical">
+    <include layout="@layout/find_information_bottom_item"/>
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_marginTop="@dimen/content_padding"
+        android:layout_marginBottom="@dimen/content_padding"
+        android:background="@color/theme_app_divider_color"/>
+    <include layout="@layout/find_information_bottom_item"/>
+    <include layout="@layout/find_item_bottom"/>
+
+</LinearLayout>

+ 71 - 0
app/src/main/res/layout/find_information_bottom_item.xml

@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@color/white">
+
+    <ImageView
+        android:id="@+id/find_information_game_icon"
+        android:layout_width="70dp"
+        android:layout_height="70dp"
+        android:src="@mipmap/icon"/>
+
+    <TextView
+        android:id="@+id/find_information_game_name"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="5dp"
+        android:maxLines="2"
+        android:text="小绵羊小绵羊小绵羊小绵羊小小绵羊小绵羊小绵羊小绵羊小小绵羊小绵羊小绵羊小绵羊小小绵羊小绵羊小绵羊小绵羊小"
+        android:textColor="#020202"
+        android:textSize="15sp"
+        app:layout_constraintBottom_toTopOf="@+id/find_information_game_surplus"
+        app:layout_constraintEnd_toStartOf="@+id/find_information_game_task"
+        app:layout_constraintStart_toEndOf="@+id/find_information_game_icon"
+        app:layout_constraintTop_toTopOf="@+id/find_information_game_icon" />
+
+    <TextView
+        android:id="@+id/find_information_game_surplus"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/app_name"
+        android:textColor="#989898"
+        android:textSize="13sp"
+        app:layout_constraintBottom_toTopOf="@+id/find_information_game_time"
+        app:layout_constraintStart_toStartOf="@+id/find_information_game_name"
+        app:layout_constraintTop_toBottomOf="@+id/find_information_game_name" />
+
+    <TextView
+        android:id="@+id/find_information_game_time"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/app_name"
+        android:textColor="#989898"
+        android:textSize="13sp"
+        app:layout_constraintBottom_toBottomOf="@+id/find_information_game_icon"
+        app:layout_constraintStart_toStartOf="@+id/find_information_game_name"
+        app:layout_constraintTop_toBottomOf="@+id/find_information_game_surplus" />
+
+    <TextView
+        android:id="@+id/find_information_game_yuan"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/app_name"
+        android:textColor="@color/red"
+        android:textSize="17sp"
+        app:layout_constraintBottom_toTopOf="@+id/find_information_game_task"
+        app:layout_constraintEnd_toEndOf="@+id/find_information_game_task"
+        app:layout_constraintStart_toStartOf="@+id/find_information_game_task"
+        app:layout_constraintTop_toTopOf="@+id/find_information_game_icon" />
+
+    <TextView
+        android:id="@+id/find_information_game_task"
+        style="@style/style_button_wrap"
+        android:text="接受任务"
+        app:layout_constraintBottom_toBottomOf="@+id/find_information_game_icon"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@+id/find_information_game_name"
+        app:layout_constraintTop_toBottomOf="@+id/find_information_game_yuan" />
+
+</android.support.constraint.ConstraintLayout>

+ 64 - 0
app/src/main/res/layout/find_information_top.xml

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:padding="@dimen/content_padding"
+    android:background="@color/white">
+
+    <TextView
+        android:id="@+id/find_information_name"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:text="@string/app_name"
+        android:textColor="#020202"
+        android:textSize="15sp"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/find_information_time"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/dp_10"
+        android:text="@string/app_name"
+        android:textColor="#989898"
+        android:textSize="13sp"
+        app:layout_constraintTop_toBottomOf="@+id/find_information_name" />
+
+    <ImageView
+        android:id="@+id/find_information_eye"
+        android:layout_width="20dp"
+        android:layout_height="wrap_content"
+        android:adjustViewBounds="true"
+        android:scaleType="fitXY"
+        android:src="@mipmap/watch"
+        android:layout_marginStart="@dimen/content_padding_20"
+        app:layout_constraintTop_toTopOf="@+id/find_information_time"
+        app:layout_constraintBottom_toBottomOf="@+id/find_information_time"
+        app:layout_constraintStart_toEndOf="@+id/find_information_time" />
+    <TextView
+        android:id="@+id/find_information_look"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/dp_10"
+        android:text="@string/app_name"
+        android:textColor="#989898"
+        android:textSize="13sp"
+        android:layout_marginStart="8dp"
+        app:layout_constraintBaseline_toBaselineOf="@+id/find_information_time"
+        app:layout_constraintStart_toEndOf="@+id/find_information_eye" />
+    <View
+        android:id="@+id/find_information_line"
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="@color/theme_app_divider_color"
+        android:layout_marginTop="@dimen/content_padding_10"
+        app:layout_constraintTop_toBottomOf="@+id/find_information_time"/>
+    <com.sheep.gamegroup.view.customview.WebViewForScrollView
+        android:id="@+id/find_information_content_wb"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_marginTop="@dimen/content_padding_10"
+        app:layout_constraintTop_toBottomOf="@+id/find_information_line"
+        app:layout_constraintBottom_toBottomOf="parent"/>
+</android.support.constraint.ConstraintLayout>

+ 60 - 28
app/src/main/res/layout/find_item.xml

@@ -1,51 +1,83 @@
 <?xml version="1.0" encoding="utf-8"?>
-<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
+    android:layout_marginEnd="@dimen/content_padding"
+    android:layout_marginStart="@dimen/content_padding"
     android:layout_marginTop="@dimen/content_padding_10"
     android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
-    android:paddingBottom="@dimen/content_padding_10"
-    android:paddingEnd="@dimen/content_padding_20"
-    android:paddingStart="@dimen/content_padding_20"
-    android:paddingTop="@dimen/content_padding_20">
+    android:orientation="vertical"
+    android:padding="@dimen/dp_10">
 
-    <TextView
-        android:id="@+id/find_item_name"
-        android:layout_width="wrap_content"
+    <LinearLayout
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:text="@string/app_name"
-        android:textColor="@color/black_6_3"
-        android:textSize="15sp" />
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <TextView
+            android:id="@+id/find_item_name"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:text="@string/app_name"
+            android:textColor="@color/black_6_3"
+            android:textSize="15sp" />
+
+        <com.kfzs.android.view.tag.TagFlowLayout
+            android:id="@+id/find_item_tags"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="@dimen/dp_10" />
+    </LinearLayout>
+
     <TextView
         android:id="@+id/find_item_time"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/dp_10"
         android:text="@string/app_name"
         android:textColor="#9B9B9B"
         android:textSize="12sp" />
 
-    <com.kfzs.android.view.tag.TagFlowLayout
-        android:id="@+id/find_item_tags"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"/>
 
     <ImageView
         android:id="@+id/find_item_iv"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:adjustViewBounds="true"
-        android:scaleType="fitXY"
-        android:src="@mipmap/icon"
-        app:layout_constraintStart_toStartOf="parent" />
+        android:layout_marginTop="@dimen/dp_10"
+        android:src="@mipmap/icon" />
 
-    <TextView
-        android:id="@+id/find_item_des"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/app_name"
-        android:textColor="#646464"
-        android:textSize="14sp" />
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <TextView
+            android:id="@+id/find_item_des"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/dp_10"
+            android:maxLines="2"
+            android:text="@string/app_name"
+            android:textColor="#646464"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/find_item_pf_label"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_below="@+id/find_item_des"
+            android:layout_marginTop="@dimen/dp_10"
+            android:text="评分:8.9"
+            android:textColor="#646464"
+            android:textSize="14sp" />
 
+        <TextView
+            android:id="@+id/find_item_download"
+            style="@style/style_button_wrap"
+            android:layout_alignParentEnd="true"
+            android:layout_centerVertical="true"
+            android:text="下载游戏" />
+    </RelativeLayout>
 
-</android.support.constraint.ConstraintLayout>
+</LinearLayout>

+ 23 - 0
app/src/main/res/layout/find_item_bottom.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:gravity="center"
+    android:layout_margin="@dimen/content_padding_20"
+    android:orientation="horizontal">
+
+    <ImageView
+        android:layout_width="30dp"
+        android:layout_height="wrap_content"
+        android:adjustViewBounds="true"
+        android:scaleType="fitXY"
+        android:src="@mipmap/bottom_icon"/>
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="@dimen/content_padding"
+        android:text="我是有底线的"
+        android:textColor="#C0C0C0"
+        android:textSize="14sp" />
+</LinearLayout>

+ 16 - 0
app/src/main/res/layout/find_item_tag.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/find_tag_tv"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:paddingTop="5dp"
+    android:paddingBottom="5dp"
+    android:paddingStart="20dp"
+    android:paddingEnd="20dp"
+    android:gravity="center"
+    android:textAlignment="center"
+    android:textColor="@color/main_tab_activated"
+    android:background="@drawable/layer_list_check_rectgangle"
+    android:layout_marginStart="@dimen/dp_10"
+    android:textSize="@dimen/text_size_13"
+    android:text="小标签" />

+ 57 - 0
app/src/main/res/layout/find_reservation_item.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <ImageView
+        android:id="@+id/find_information_game_icon"
+        android:layout_width="80dp"
+        android:layout_height="80dp"
+        android:src="@mipmap/icon"/>
+
+    <TextView
+        android:id="@+id/find_information_game_name"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="5dp"
+        android:maxLines="2"
+        android:lines="2"
+        android:text="小绵羊小绵羊小绵羊小绵羊小小绵羊小绵羊小绵羊小绵羊小小绵羊小绵羊小绵羊小绵羊小小绵羊小绵羊小绵羊小绵羊小"
+        android:textColor="#020202"
+        android:textSize="15sp"
+        app:layout_constraintBottom_toTopOf="@+id/find_information_game_time"
+        app:layout_constraintEnd_toStartOf="@+id/find_information_game_bt2"
+        app:layout_constraintStart_toEndOf="@+id/find_information_game_icon"
+        app:layout_constraintTop_toTopOf="@+id/find_information_game_icon" />
+
+    <TextView
+        android:id="@+id/find_information_game_time"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/app_name"
+        android:textColor="#989898"
+        android:textSize="13sp"
+        app:layout_constraintBottom_toBottomOf="@+id/find_information_game_icon"
+        app:layout_constraintStart_toStartOf="@+id/find_information_game_name"
+        app:layout_constraintTop_toBottomOf="@+id/find_information_game_name" />
+
+
+    <TextView
+        android:id="@+id/find_information_game_bt1"
+        style="@style/style_button_wrap"
+        android:text="立即下载"
+        app:layout_constraintBottom_toTopOf="@+id/find_information_game_bt2"
+        app:layout_constraintEnd_toEndOf="@+id/find_information_game_bt2"
+        app:layout_constraintStart_toStartOf="@+id/find_information_game_bt2"
+        app:layout_constraintTop_toTopOf="@+id/find_information_game_icon"/>
+    <TextView
+        android:id="@+id/find_information_game_bt2"
+        style="@style/style_button_wrap2"
+        android:text="立即预约"
+        app:layout_constraintBottom_toBottomOf="@+id/find_information_game_icon"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@+id/find_information_game_name"
+        app:layout_constraintTop_toBottomOf="@+id/find_information_game_bt1" />
+
+</android.support.constraint.ConstraintLayout>

+ 5 - 0
app/src/main/res/layout/find_reservation_item_bottom.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="@dimen/content_padding"
+    android:background="@drawable/shape_white_solid_rectangle_small_bottom"/>

+ 17 - 0
app/src/main/res/layout/find_reservation_item_center.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@color/white"
+    android:orientation="vertical">
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_marginTop="@dimen/content_padding"
+        android:layout_marginBottom="@dimen/content_padding"
+        android:background="#F2F2F2" />
+
+    <include layout="@layout/find_reservation_item" />
+
+</LinearLayout>

+ 22 - 0
app/src/main/res/layout/find_reservation_item_top.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingTop="@dimen/content_padding"
+    android:paddingStart="@dimen/content_padding"
+    android:paddingEnd="@dimen/content_padding"
+    android:background="@drawable/shape_white_solid_rectangle_small_top"
+    android:orientation="vertical">
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="@dimen/content_padding"
+        android:layout_marginBottom="@dimen/content_padding"
+        android:text="推荐"
+        android:textColor="@color/black"
+        android:textSize="15sp" />
+
+    <include layout="@layout/find_reservation_item" />
+
+</LinearLayout>

+ 35 - 0
app/src/main/res/layout/net_empty_fresh_list.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/bg_gray">
+
+    <include
+        android:id="@+id/title"
+        layout="@layout/title"/>
+
+    <include
+        android:id="@+id/check_net_ll"
+        layout="@layout/check_net_view"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_below="@+id/title"/>
+
+    <include
+        android:id="@+id/empty_view"
+        layout="@layout/empty_view"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_below="@+id/check_net_ll" />
+    <com.sheep.gamegroup.util.SheepSwipeRefreshLayout
+        android:id="@+id/refresh"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_below="@+id/check_net_ll" >
+        <android.support.v7.widget.RecyclerView
+            android:id="@+id/view_list"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_margin="@dimen/content_padding_10"/>
+    </com.sheep.gamegroup.util.SheepSwipeRefreshLayout>
+</RelativeLayout>

+ 39 - 0
app/src/main/res/layout/net_empty_fresh_list_not_wrap.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/bg_gray">
+
+    <include
+        android:id="@+id/title"
+        layout="@layout/title"/>
+
+    <include
+        android:id="@+id/check_net_ll"
+        layout="@layout/check_net_view"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_below="@+id/title"/>
+
+    <include
+        android:id="@+id/empty_view"
+        layout="@layout/empty_view"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_below="@+id/check_net_ll" />
+    <android.support.v4.widget.SwipeRefreshLayout
+        android:id="@+id/refresh"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:padding="@dimen/content_padding"
+        android:layout_below="@+id/check_net_ll" >
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/view_list"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"/>
+        </LinearLayout>
+    </android.support.v4.widget.SwipeRefreshLayout>
+</RelativeLayout>

BIN
app/src/main/res/mipmap-xhdpi/personalc_ic_reservation.png


BIN
app/src/main/res/mipmap-xxhdpi/bottom_icon.webp


BIN
app/src/main/res/mipmap-xxhdpi/share.webp


BIN
app/src/main/res/mipmap-xxhdpi/watch.webp


BIN
app/src/main/res/mipmap-xxhdpi/xin_ash.png


+ 28 - 0
app/src/main/res/values/dd_styles.xml

@@ -23,6 +23,30 @@
         <item name="android:layout_margin">@dimen/dp_10</item>
         <item name="android:textSize">@dimen/text_size_15</item>
     </style>
+    <style name="style_button_wrap">
+        <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:background">@drawable/selector_button_full_main</item>
+        <item name="android:gravity">center</item>
+        <item name="android:paddingBottom">5dp</item>
+        <item name="android:paddingEnd">@dimen/content_padding_20</item>
+        <item name="android:paddingStart">@dimen/content_padding_20</item>
+        <item name="android:paddingTop">5dp</item>
+        <item name="android:textColor">@color/btn_color_main</item>
+        <item name="android:textSize">@dimen/text_size_15</item>
+    </style>
+    <style name="style_button_wrap2">
+        <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:background">@drawable/selector_button_full_main2</item>
+        <item name="android:gravity">center</item>
+        <item name="android:paddingBottom">5dp</item>
+        <item name="android:paddingEnd">@dimen/content_padding_20</item>
+        <item name="android:paddingStart">@dimen/content_padding_20</item>
+        <item name="android:paddingTop">5dp</item>
+        <item name="android:textColor">@color/selector_color_main_tab2</item>
+        <item name="android:textSize">@dimen/text_size_15</item>
+    </style>
     <style name="style_button_show" parent="button">
         <item name="android:layout_width">0dp</item>
         <item name="android:layout_height">30dp</item>
@@ -140,6 +164,10 @@
         <item name="android:maxHeight">16dip</item>
         <item name="android:layout_height">10dip</item>
     </style>
+    <style name="style_rating_bar" parent="@android:style/Widget.RatingBar">
+        <item name="android:progressDrawable">@drawable/lay_list_ratingbar</item>
+        <item name="android:layout_height">14dip</item>
+    </style>
 
     <style name="W2">
         <item name="android:textColor">@color/white</item>

+ 2 - 0
app/src/main/res/values/str_network_strings.xml

@@ -4,6 +4,8 @@
     <string name="loading_data">数据正在加载中,请稍候重试</string>
     <string name="service_data_error">数据错误,请稍候再试</string>
     <string name="unknown_error">未知错误,请稍候再试</string>
+    <string name="error_data">数据错误,请联系客服</string>
+    <string name="error_link">地址错误,请联系客服</string>
     <string name="error_download_link">下载地址错误,请联系客服</string>
     <string name="error_package_link">包名错误,请联系客服</string>
 </resources>

+ 2 - 2
gradle.properties

@@ -17,8 +17,8 @@
 # org.gradle.parallel=true
 #android.injected.build.model.only.versioned = 3
 
-VERSION_NAME=2.6.3
-VERSION_CODE=2006003
+VERSION_NAME=2.7.0
+VERSION_CODE=2007000
 ANDROID_COMPILE_SDK_VERSION=27
 ANDROID_BUILD_TOOLS_VERSION=27.0.2
 ANDROID_MIN_SDK_VERSION=18

+ 3 - 3
view/build.gradle

@@ -31,8 +31,8 @@ dependencies {
     compile 'com.android.support:appcompat-v7:27.1.0'
     compile 'com.android.support:support-v4:27.1.0'
 //    compile 'com.github.bumptech.glide:glide:3.7.0'
-    compile ('jp.wasabeef:glide-transformations:2.0.2'){
-        exclude group: 'com.github.bumptech.glide', module: 'glide'
-    }
+//    compile ('jp.wasabeef:glide-transformations:2.0.2'){
+//        exclude group: 'com.github.bumptech.glide', module: 'glide'
+//    }
 //    compile project(':sheep')
 }