Parcourir la source

列表显示不正常

zengjiebin il y a 7 ans
Parent
commit
f815a9c8c7

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

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

+ 93 - 27
app/src/main/java/com/kfzs/duanduan/fragment/FgtFindChild.java

@@ -6,33 +6,41 @@ import android.support.annotation.Nullable;
 import android.support.v4.widget.SwipeRefreshLayout;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
+import android.text.Html;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.widget.ImageView;
 import android.widget.TextView;
 
+import com.alibaba.fastjson.JSON;
 import com.kfzs.android.view.tag.FlowLayout;
 import com.kfzs.android.view.tag.TagAdapter;
 import com.kfzs.android.view.tag.TagFlowLayout;
 import com.kfzs.duanduan.BaseCompatFragment;
-import com.kfzs.duanduan.mine.GiftpackListAdapter;
+import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.FindItem;
+import com.sheep.gamegroup.model.entity.FindTag;
 import com.sheep.gamegroup.model.entity.UserLabel;
-import com.sheep.gamegroup.model.entity.UserLabelList;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.SysAppUtil;
 import com.sheep.gamegroup.util.ViewHolder;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.activity.ActUserLabelList;
 import com.sheep.gamegroup.view.adapter.AdbCommonRecycler;
-import com.sheep.gamegroup.view.fragment.FgtTryMakeMoney;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
 
 import java.util.List;
+import java.util.Locale;
 
 import butterknife.BindView;
 import butterknife.ButterKnife;
+import rx.android.schedulers.AndroidSchedulers;
 import rx.functions.Action1;
+import rx.schedulers.Schedulers;
 
 /**
  * Created by realicing on 2018/6/27.
@@ -82,6 +90,67 @@ public class FgtFindChild extends BaseCompatFragment {
                 refresh.setRefreshing(false);
             }
         });
+
+
+        view_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
+        view_list.setAdapter(new AdbCommonRecycler<FindItem>(SheepApp.getInstance(), list){
+
+            @Override
+            public int getViewIdByType(int type) {
+                return R.layout.find_item;
+            }
+
+            @Override
+            public void convert(ViewHolder holder, final FindItem item) {
+                View rootConvertView = holder.itemView;
+                TextView find_item_name = (TextView)rootConvertView.findViewById(R.id.find_item_name);
+                TextView find_item_time = (TextView)rootConvertView.findViewById(R.id.find_item_time);
+                ImageView find_item_iv = (ImageView)rootConvertView.findViewById(R.id.find_item_iv);
+                TextView find_item_des = (TextView)rootConvertView.findViewById(R.id.find_item_des);
+                TextView find_item_pf_label = (TextView)rootConvertView.findViewById(R.id.find_item_pf_label);
+                TextView find_item_download = (TextView)rootConvertView.findViewById(R.id.find_item_download);
+                TagFlowLayout find_item_tags = (TagFlowLayout)rootConvertView.findViewById(R.id.find_item_tags);
+
+                if(item.isGame()){
+                    find_item_download.setVisibility(View.VISIBLE);
+                    find_item_pf_label.setText(Html.fromHtml(String.format(Locale.CHINA, "评分:<font color='%s'>%.1f</font>", "#29d6fd", item.getScore())));
+                    find_item_download.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            G.showToast("您点击了下载游戏");
+                        }
+                    });
+                } else {
+                    find_item_download.setVisibility(View.GONE);
+                    find_item_pf_label.setVisibility(View.GONE);
+                }
+                ViewUtil.setText(find_item_name, item.getTitle());
+                ViewUtil.setTextTime(find_item_time, item.getCreated_at(), "yyyy-MM-dd");
+                ViewUtil.setImage(activity, find_item_iv, item.getPictures());
+                ViewUtil.setText(find_item_des, item.getContent());
+                if(ListUtil.isEmpty(item.getTages())){
+                    find_item_tags.setVisibility(View.GONE);
+                } else {
+                    find_item_tags.setVisibility(View.VISIBLE);
+                    TagAdapter adapter = new TagAdapter<FindTag>(item.getTages()) {
+                        @Override
+                        public View getView(FlowLayout parent, int position, FindTag item) {
+                            TextView tv = (TextView) LayoutInflater.from(activity).inflate(R.layout.user_label, parent, false);
+                            ViewUtil.setText(tv, item.getName());
+                            return tv;
+                        }
+                    };
+                    find_item_tags.setAdapter(adapter);
+                }
+
+                rootConvertView.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        G.showToast("您点击了一个发现");
+                    }
+                });
+            }
+        });
     }
 
     private void initData(){
@@ -91,37 +160,34 @@ public class FgtFindChild extends BaseCompatFragment {
                 if(result != 0){//无网络
                     if(check_net_ll != null)
                         check_net_ll.setVisibility(View.VISIBLE);
-                    testInitData();
-                    loadData();
                 } else {
                     if(check_net_ll != null)
                         check_net_ll.setVisibility(View.GONE);
+
                 }
             }
         });
-    }
+        SheepApp.getInstance().getNetComponent().getApiService().getFindList(1, 100, type)
+                        .subscribeOn(Schedulers.io())
+                        .observeOn(AndroidSchedulers.mainThread())
+                        .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                            @Override
+                            public void onNext(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onNext "+ JSON.toJSONString(baseMessage));
+                                List<FindItem> newList = baseMessage.getDatas(FindItem.class);
+                                if(!ListUtil.isEmpty(newList)){
+                                    list.clear();
+                                    ListUtil.addAll(list, newList);
+                                    view_list.getAdapter().notifyDataSetChanged();
+                                }
+                            }
 
-    private void testInitData() {
-        for (int i = 0; i < 10; i++) {
-            list.add(new FindItem());
-        }
+                            @Override
+                            public void onError(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
+                                G.showToast(baseMessage);
+                            }
+                        });
     }
     private List<FindItem> list = ListUtil.emptyList();
-    private void loadData() {
-        view_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
-        view_list.setAdapter(new AdbCommonRecycler<FindItem>(SheepApp.getInstance(), list){
-
-            @Override
-            public int getViewIdByType(int type) {
-                return R.layout.find_item;
-            }
-
-            @Override
-            public void convert(ViewHolder holder, final FindItem item) {
-                View rootConvertView = holder.itemView;
-                TextView user_label_tv = rootConvertView.findViewById(R.id.user_label_tv);
-
-            }
-        });
-    }
 }

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

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

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

@@ -587,4 +587,35 @@ public interface ApiService {
     @GET("app/user/recharge_log")
     Observable<BaseMessage> rechargeLog(@Query("page") int page, @Query("per_page") int per_page);
 
+
+    /**
+     * 获取标签列表
+     */
+    @GET("app/find/articles_tags/list")
+    Observable<BaseMessage> getFindTagList();
+    /**
+     * 发现模块列表
+     */
+    @GET("app/find/articles/list")
+    Observable<BaseMessage> getFindList(@Query("page") int page, @Query("per_page") int per_page, @Query("tag_id") int id);
+    /**
+     * 发现内容详情
+     */
+    @GET("app/find/articles")
+    Observable<BaseMessage> getFindDetail(@Query("id") int id);
+    /**
+     * 应用评分
+     * {
+     "application_id": 0,
+     "score": 0,
+     "user_id": 0
+     }
+     */
+    @POST("app/find/applications/score")
+    Observable<BaseMessage> commitAppScore(@Body JSONObject jsonObject);
+    /**
+     * 获取应用详情
+     */
+    @GET("app/find/applications")
+    Observable<BaseMessage> getAppDetail(@Query("id") int id);
 }

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

@@ -1,12 +1,14 @@
 package com.sheep.gamegroup.model.entity;
 
+import java.io.Serializable;
+
 /**
  * Created by realicing on 2018/6/6.
  * realicing@sina.com
  * display_type;//类型: 1 图片 2 视频
  * link_type;//转跳类型1:H5外部 2:H5内部 3:试玩赚钱 4:单个任务 5:信用卡 6:微信二维码 7:连续任务 8:打卡赚钱
  */
-public class Advertising {
+public class Advertising implements Serializable{
     private String updated_at;
 
     private String end_time;

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

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

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

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

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

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

+ 29 - 1
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -37,6 +37,7 @@ import com.sheep.gamegroup.view.dialog.DialogPayGame;
 import com.sheep.gamegroup.view.dialog.DialogShare;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.ClassFileHelper;
 import com.sheep.jiuyan.samllsheep.utils.G;
 
@@ -44,6 +45,8 @@ 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;
 
@@ -332,7 +335,7 @@ public class ViewUtil {
                             if(index < length){
                                 int position = msg.indexOf(key, index);
                                 String start = msg.substring(0, position);
-                                String middle = String.format(Locale.CHINA, "<font color='%s'>%s</font>", value, key);
+                                String middle = getHtmlText(key, value);
                                 String end = msg.substring(position + key.length());
                                 index = (start+middle).length();
                                 msg = start + middle + end;
@@ -453,6 +456,16 @@ public class ViewUtil {
         return dialog;
     }
 
+    /**
+     * 获取html格式并带颜色的文字
+     * @param text 文字
+     * @param color 颜色
+     * @return
+     */
+    public static String getHtmlText(String text, String color) {
+        return String.format(Locale.CHINA, "<font color='%s'>%s</font>", color, text);
+    }
+
 
     public static void showHalfScreenAd(final Activity activity, final Advertising advertising, Container<Action1<Integer>> container) {
         if (activity != null) {
@@ -595,6 +608,21 @@ public class ViewUtil {
         new DialogShare(activity, url).showShare();
     }
 
+    public static void setImage(Activity activity, ImageView imageView, String pictures) {
+        if(imageView != null){
+            if(pictures.contains(";")){
+                pictures = pictures.split(";")[0];
+            }
+            Glide.with(activity)
+                    .load(pictures)
+                    .into(imageView);
+        }
+    }
+    public static void setTextTime(TextView textView, long time, String format) {
+        if(textView != null){
+            textView.setText(TimeUtil.TimeStamp2Date(time, format));
+        }
+    }
     public static void setText(TextView textView) {
         if(textView != null){
             textView.setText("");

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

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

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

@@ -5,12 +5,13 @@
     android:background="@color/bg_gray"
     android:orientation="vertical">
 
+    <include
+        layout="@layout/check_net_view"/>
+
     <com.sheep.gamegroup.util.SheepSwipeRefreshLayout
         android:id="@+id/find_refresh"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content">
-        <include
-            layout="@layout/check_net_view"/>
+        android:layout_height="match_parent">
         <android.support.v7.widget.RecyclerView
             android:id="@+id/find_list"
             android:layout_width="match_parent"

+ 68 - 25
app/src/main/res/layout/find_item.xml

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

+ 2 - 2
gradle.properties

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