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

添加发现应用详情与资讯详情界面与功能,接口基本通过,功能待完善

zengjiebin лет назад: 7
Родитель
Сommit
2d90a22ef6
41 измененных файлов с 2061 добавлено и 194 удалено
  1. 4 0
      app/src/main/AndroidManifest.xml
  2. 86 6
      app/src/main/java/com/kfzs/duanduan/fragment/FgtFindChild.java
  3. 15 4
      app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java
  4. 16 0
      app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java
  5. 169 0
      app/src/main/java/com/sheep/gamegroup/model/entity/FindApp.java
  6. 26 0
      app/src/main/java/com/sheep/gamegroup/model/entity/FindAppScore.java
  7. 3 3
      app/src/main/java/com/sheep/gamegroup/model/entity/FindItem.java
  8. 57 0
      app/src/main/java/com/sheep/gamegroup/model/entity/MyFindAppCore.java
  9. 1 1
      app/src/main/java/com/sheep/gamegroup/model/util/ExceptionHandle.java
  10. 33 4
      app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java
  11. 9 0
      app/src/main/java/com/sheep/gamegroup/util/Conversion.java
  12. 10 0
      app/src/main/java/com/sheep/gamegroup/util/Conversion2.java
  13. 38 10
      app/src/main/java/com/sheep/gamegroup/util/GlideImageLoader.java
  14. 41 14
      app/src/main/java/com/sheep/gamegroup/util/ImageGlarryDrawable.java
  15. 25 0
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  16. 19 0
      app/src/main/java/com/sheep/gamegroup/util/ListUtil.java
  17. 12 8
      app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java
  18. 429 0
      app/src/main/java/com/sheep/gamegroup/view/activity/ActFindGame.java
  19. 323 0
      app/src/main/java/com/sheep/gamegroup/view/activity/ActFindInformation.java
  20. 2 2
      app/src/main/java/com/sheep/gamegroup/view/activity/ActLoadH5.java
  21. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/ActNewAboutUs.java
  22. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/PersionInfoAct.java
  23. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/PhoneAct.java
  24. 0 118
      app/src/main/java/com/sheep/gamegroup/view/customview/CustomWebView.java
  25. 29 0
      app/src/main/java/com/sheep/gamegroup/view/customview/WebViewForScrollView.java
  26. BIN
      app/src/main/res/drawable-xxhdpi/xin_empty.png
  27. BIN
      app/src/main/res/drawable-xxhdpi/xin_full.png
  28. 44 0
      app/src/main/res/drawable/lay_list_progress.xml
  29. 14 0
      app/src/main/res/drawable/lay_list_ratingbar.xml
  30. 461 0
      app/src/main/res/layout/act_find_game.xml
  31. 21 0
      app/src/main/res/layout/find_information_bottom.xml
  32. 71 0
      app/src/main/res/layout/find_information_bottom_item.xml
  33. 64 0
      app/src/main/res/layout/find_information_top.xml
  34. 4 15
      app/src/main/res/layout/find_item.xml
  35. 10 3
      app/src/main/res/layout/fgt_find_child.xml
  36. BIN
      app/src/main/res/mipmap-xxhdpi/share.webp
  37. BIN
      app/src/main/res/mipmap-xxhdpi/watch.webp
  38. BIN
      app/src/main/res/mipmap-xxhdpi/xin_ash.png
  39. 17 0
      app/src/main/res/values/dd_styles.xml
  40. 2 0
      app/src/main/res/values/str_network_strings.xml
  41. 3 3
      view/build.gradle

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

@@ -496,6 +496,10 @@
             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"/>
     </application>
 
 

+ 86 - 6
app/src/main/java/com/kfzs/duanduan/fragment/FgtFindChild.java

@@ -7,6 +7,7 @@ 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;
@@ -20,7 +21,10 @@ import com.kfzs.duanduan.BaseCompatFragment;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.FindItem;
 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;
@@ -67,22 +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() {
@@ -135,8 +142,8 @@ public class FgtFindChild extends BaseCompatFragment {
                 }
                 ViewUtil.setText(find_item_name, item.getTitle());
                 ViewUtil.setTextTime(find_item_time, item.getCreated_at(), "yyyy-MM-dd");
-                ViewUtil.setImage(activity, find_item_iv, item.getPictures());
-                ViewUtil.setText(find_item_des, item.getContent());
+                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 {
@@ -155,13 +162,86 @@ public class FgtFindChild extends BaseCompatFragment {
                 rootConvertView.setOnClickListener(new View.OnClickListener() {
                     @Override
                     public void onClick(View view) {
-                        G.showToast("您点击了一个发现");
+                        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>() {

+ 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) {

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

@@ -618,4 +618,20 @@ public interface ApiService {
      */
     @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);
+
+    /**
+     * 首页list
+     */
+    @GET("app/home_list/{id}")
+    Observable<BaseMessage> getHomeListItem(@Path("id") int id);
 }

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

@@ -0,0 +1,169 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/6/28.
+ * realicing@sina.com
+ */
+public class FindApp {
+    private int updated_at;
+
+    private float score;//评分
+
+    private String download_url;//下载地址
+
+    private int 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;//下载数量
+
+    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(int package_size){
+        this.package_size = package_size;
+    }
+    public int 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;
+    }
+
+
+    /**
+     * 是否是预约下载
+     * @return
+     */
+    public boolean isReservationDownload(){
+        return download_type == 2;//1:非预约下载 2:预约下载
+    }
+}

+ 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;
+    }
+}

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

@@ -46,7 +46,7 @@ public class FindItem {
 
     private int application_id;//应用ID (咨询和游戏时)
 
-    private int clicks;//点击次数
+    private String clicks;//点击次数
 
     private int sort;//排序
 
@@ -148,10 +148,10 @@ public class FindItem {
     public int getApplication_id(){
         return this.application_id;
     }
-    public void setClicks(int clicks){
+    public void setClicks(String clicks){
         this.clicks = clicks;
     }
-    public int getClicks(){
+    public String getClicks(){
         return this.clicks;
     }
     public void setSort(int sort){

+ 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;
+    }
+}

+ 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;
         }
     }

+ 33 - 4
app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java

@@ -376,10 +376,8 @@ public class CommonUtil {
             e.printStackTrace();
         }
     }
-    /**
-     *
-     */
-    public void goNative(Context context, HomeListEntity entity){
+
+    private void goNative(Context context, HomeListEntity entity){
 
         switch(Integer.valueOf(entity.getJump())){
             case 1://试玩赚钱
@@ -975,4 +973,35 @@ 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);
+}

+ 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;
+    }
 }

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

@@ -24,6 +24,7 @@ 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.FindItem;
 import com.sheep.gamegroup.model.entity.NewbieTask;
 import com.sheep.gamegroup.model.entity.NewbieTaskRecord;
 import com.sheep.gamegroup.model.entity.TaskAcceptedEty;
@@ -37,6 +38,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;
@@ -1288,4 +1291,26 @@ public class Jump2View {
                 });
         UMConfigUtils.onEvent(UMConfigUtils.Event.XIANWAN_WEBVIEW);
     }
+
+    /**
+     * 发现模块--游戏详情界面
+     * @param activity
+     * @param item
+     */
+    public void goFindGame(Activity activity, FindItem item) {
+        Intent intent = new Intent(activity, ActFindGame.class);
+        intent.putExtra("id", item.getApplication_id());
+        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);
+    }
 }

+ 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){

+ 12 - 8
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;
@@ -45,8 +45,6 @@ import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
 import java.util.Locale;
 import java.util.Map;
 
@@ -608,14 +606,20 @@ public class ViewUtil {
         new DialogShare(activity, url).showShare();
     }
 
-    public static void setImage(Activity activity, ImageView imageView, String pictures) {
-        if(imageView != null){
+    public static void setImage(ImageView imageView, String pictures) {
+        if(imageView != null && !TextUtils.isEmpty(pictures)){
             if(pictures.contains(";")){
                 pictures = pictures.split(";")[0];
             }
-            Glide.with(activity)
-                    .load(pictures)
-                    .into(imageView);
+            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) {

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

@@ -0,0 +1,429 @@
+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.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.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.GlideImageLoader;
+import com.sheep.gamegroup.util.ImageGlarryDrawable;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.LogUtil;
+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_size_tv)
+    TextView find_game_size_tv;
+    @BindView(R.id.find_game_xin)
+    RatingBar find_game_xin;
+    @BindView(R.id.find_game_down_tv)
+    TextView find_game_down_tv;
+
+    private void loadData(final FindApp findApp) {
+        //游戏简介与下载
+        ViewUtil.setImage(find_game_iv, findApp.getIcon());
+        ViewUtil.setText(find_game_name_tv, findApp.getName());
+        ViewUtil.setText(find_game_info_tv, String.format(Locale.CHINA, "厂商:%s | 版本号:%s", findApp.getManufacturer(), findApp.getVersions()));
+        ViewUtil.setText(find_game_size_tv, String.format(Locale.CHINA, "包体大小:%sM", findApp.getPackage_size()));
+        find_game_xin.setRating(findApp.getScore()/2);
+        find_game_down_tv.setText(findApp.isReservationDownload() ? "预约下载" : "立即下载");
+        find_game_down_tv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                G.showToast("您点击了"+(findApp.isReservationDownload() ? "预约下载" : "立即下载"));
+            }
+        });
+        //游戏图片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_size_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());
+    }
+}

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

@@ -0,0 +1,323 @@
+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.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 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());
+        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);
+        find_information_game_task.setText("立即下载");
+        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().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));
         /*
           标题显示和隐藏的监听

+ 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

+ 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);
+    }
+}

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>

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

@@ -0,0 +1,461 @@
+<?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:text="厂商:网易 | 版本号:7.9"
+                    android:textColor="@color/black_666666"
+                    android:textSize="15sp" />
+
+                <TextView
+                    android:id="@+id/find_game_size_tv"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:gravity="center"
+                    android:text="包体大小:856M"
+                    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>

+ 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>

+ 4 - 15
app/src/main/res/layout/find_item.xml

@@ -7,10 +7,7 @@
     android:layout_marginTop="@dimen/content_padding_10"
     android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
     android:orientation="vertical"
-    android:paddingBottom="@dimen/dp_10"
-    android:paddingEnd="@dimen/content_padding_20"
-    android:paddingStart="@dimen/content_padding_20"
-    android:paddingTop="@dimen/content_padding_20">
+    android:padding="@dimen/dp_10">
 
     <LinearLayout
         android:layout_width="match_parent"
@@ -60,6 +57,7 @@
             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" />
@@ -76,19 +74,10 @@
 
         <TextView
             android:id="@+id/find_item_download"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
+            style="@style/style_button_wrap"
             android:layout_alignParentEnd="true"
             android:layout_centerVertical="true"
-            android:background="@drawable/selector_button_full_main"
-            android:gravity="center"
-            android:paddingBottom="5dp"
-            android:paddingEnd="@dimen/content_padding_20"
-            android:paddingStart="@dimen/content_padding_20"
-            android:paddingTop="5dp"
-            android:text="下载游戏"
-            android:textColor="@color/btn_color_main"
-            android:textSize="@dimen/text_size_15" />
+            android:text="下载游戏" />
     </RelativeLayout>
 
 </LinearLayout>

+ 10 - 3
app/src/main/res/layout/fgt_find_child.xml

@@ -5,8 +5,15 @@
     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"/>
+        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"
@@ -15,12 +22,12 @@
         android:layout_height="match_parent"
         android:layout_below="@+id/check_net_ll" />
     <com.sheep.gamegroup.util.SheepSwipeRefreshLayout
-        android:id="@+id/find_refresh"
+        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/find_list"
+            android:id="@+id/view_list"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:layout_margin="@dimen/content_padding_10"/>

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


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

@@ -23,6 +23,19 @@
         <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:text">下载游戏</item>
+        <item name="android:textColor">@color/btn_color_main</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 +153,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>

+ 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')
 }