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

游戏中心 免费工具 修改 为 会员推荐;
游戏中心 官方游戏等可以排序;
游戏中心 横向游戏列表大小调整,一屏大概4.3个元素

zengjiebin лет назад: 7
Родитель
Сommit
4ac875c839

+ 9 - 1
app/src/main/java/com/sheep/gamegroup/model/entity/ListTypeList.java

@@ -9,7 +9,7 @@ import java.util.List;
 public class ListTypeList<T, TYPE> {
 public class ListTypeList<T, TYPE> {
     private List<T> list;
     private List<T> list;
     private TYPE type;
     private TYPE type;
-
+    private int sort;
     public ListTypeList(TYPE type, List<T> list) {
     public ListTypeList(TYPE type, List<T> list) {
         this.type = type;
         this.type = type;
         this.list = list;
         this.list = list;
@@ -23,4 +23,12 @@ public class ListTypeList<T, TYPE> {
         return list;
         return list;
     }
     }
 
 
+    public ListTypeList<T, TYPE> setSort(int sort) {
+        this.sort = sort;
+        return this;
+    }
+
+    public int getSort() {
+        return sort;
+    }
 }
 }

+ 16 - 4
app/src/main/java/com/sheep/gamegroup/module/game/adapter/AdpGameCenter4_0.java

@@ -6,9 +6,12 @@ import android.widget.TextView;
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.BaseViewHolder;
 import com.chad.library.adapter.base.BaseViewHolder;
 import com.sheep.gamegroup.model.entity.GameEntity;
 import com.sheep.gamegroup.model.entity.GameEntity;
+import com.sheep.gamegroup.model.entity.Lp;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.util.viewHelper.LayoutParamsUtil;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.utils.G;
 
 
 import java.util.List;
 import java.util.List;
 
 
@@ -18,14 +21,23 @@ import static com.sheep.gamegroup.view.adapter.PlayGameListAdapter.setOnClickGam
  * Created by realicing on 2019/1/21.
  * Created by realicing on 2019/1/21.
  * realicing@sina.com
  * realicing@sina.com
  */
  */
-public class AdpGameCenter4_0 extends BaseQuickAdapter<GameEntity, BaseViewHolder> {
+public class AdpGameCenter4_3 extends BaseQuickAdapter<GameEntity, BaseViewHolder> {
 
 
-    public AdpGameCenter4_0(List<GameEntity> list) {
-        super(R.layout.item_game_center_4_0, list);
+    public AdpGameCenter4_3(List<GameEntity> list) {
+        super(R.layout.item_game_center_4_3, list);
     }
     }
 
 
     @Override
     @Override
     protected void convert(BaseViewHolder helper, GameEntity item) {
     protected void convert(BaseViewHolder helper, GameEntity item) {
+        int position = helper.getAdapterPosition();
+        if(position == 0) {
+            helper.itemView.setPadding(G.getRealPix(8), G.getRealPix(16), G.getRealPix(0), G.getRealPix(16));
+        } else if(position + 1 == getItemCount()) {
+            helper.itemView.setPadding(G.getRealPix(0), G.getRealPix(16), G.getRealPix(8), G.getRealPix(16));
+        } else {
+            helper.itemView.setPadding(G.getRealPix(0), G.getRealPix(16), G.getRealPix(0), G.getRealPix(16));
+        }
+
         ImageView item_hot_welfare_iv = helper.itemView.findViewById(R.id.item_hot_welfare_iv);
         ImageView item_hot_welfare_iv = helper.itemView.findViewById(R.id.item_hot_welfare_iv);
         TextView item_hot_welfare_tv = helper.itemView.findViewById(R.id.item_hot_welfare_tv);
         TextView item_hot_welfare_tv = helper.itemView.findViewById(R.id.item_hot_welfare_tv);
         if (item == null) {
         if (item == null) {
@@ -33,7 +45,7 @@ public class AdpGameCenter4_0 extends BaseQuickAdapter<GameEntity, BaseViewHolde
         } else {
         } else {
             // 加载数据
             // 加载数据
             ViewUtil.setText(item_hot_welfare_tv, item.getApp().getName());
             ViewUtil.setText(item_hot_welfare_tv, item.getApp().getName());
-            GlideImageLoader.setGameImage(item_hot_welfare_iv, item.getApp().getIcon());
+            GlideImageLoader.setGameImage(item_hot_welfare_iv, item.getApp().getIcon(), G.getRealPix(8));
             setOnClickGameEntity(helper.itemView, item);
             setOnClickGameEntity(helper.itemView, item);
         }
         }
     }
     }

+ 59 - 0
app/src/main/java/com/sheep/gamegroup/module/game/adapter/AdpGameCenter4_3List.java

@@ -0,0 +1,59 @@
+package com.sheep.gamegroup.module.game.adapter;
+
+import android.app.Activity;
+import android.content.Context;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.View;
+import android.widget.TextView;
+
+import com.kfzs.appstore.utils.adapter.recyclerview.RecyclerViewAdapter;
+import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
+import com.sheep.gamegroup.model.entity.GameEntity;
+import com.sheep.gamegroup.model.entity.GameListType;
+import com.sheep.gamegroup.model.entity.ListTypeList;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+
+import java.util.List;
+
+
+/**
+ * Created by realicing on 2018/10/30.
+ * realicing@sina.com
+ * 游戏主页上每一屏显示有3.3个元素
+ */
+public class AdpGameCenter4_3List extends RecyclerViewAdapter<ListTypeList<GameEntity, GameListType>> {
+    public AdpGameCenter4_3List(Context context, List<ListTypeList<GameEntity, GameListType>> itemList) {
+        super(context, R.layout.item_play_game_list, itemList);
+    }
+
+    public AdpGameCenter4_3List setShowFirstTop(boolean showFirstTop) {
+        isShowFirstTop = showFirstTop;
+        return this;
+    }
+
+    private boolean isShowFirstTop = true;
+
+    @Override
+    public void convert(ViewHolder viewHolder, final ListTypeList<GameEntity, GameListType> itemList, int position) {
+        View item_play_game_list_top = viewHolder.itemView.findViewById(R.id.item_play_game_list_top);
+        TextView item_play_game_list_tv = viewHolder.itemView.findViewById(R.id.item_play_game_list_tv);
+        TextView item_play_game_list_more_tv = viewHolder.itemView.findViewById(R.id.item_play_game_list_more_tv);
+        if (!isShowFirstTop)//不显示第一项的线
+            ViewUtil.setVisibility(item_play_game_list_top, position != 0);
+        ViewUtil.setText(item_play_game_list_tv, itemList.getType().getTitle());
+        item_play_game_list_more_tv.setOnClickListener(view -> {
+            Activity activity = SheepApp.getInstance().getCurrentActivity();
+            Jump2View.getInstance().goActPlayGameList(activity, itemList.getType());
+        });
+        RecyclerView recyclerView = viewHolder.itemView.findViewById(R.id.item_play_game_list_rv);
+        LinearLayoutManager playHotManager = new LinearLayoutManager(SheepApp.getInstance(), LinearLayoutManager.HORIZONTAL, false);
+        recyclerView.setHasFixedSize(true);
+        recyclerView.setNestedScrollingEnabled(false);
+        recyclerView.setLayoutManager(playHotManager);
+        recyclerView.setAdapter(new AdpGameCenter4_3(itemList.getList()));
+    }
+}

+ 2 - 2
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtDownloadManager.java

@@ -24,7 +24,7 @@ import com.sheep.gamegroup.helper.DownloadHelper;
 import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.GameEntity;
 import com.sheep.gamegroup.model.entity.GameEntity;
-import com.sheep.gamegroup.module.game.adapter.AdpGameCenter4_0;
+import com.sheep.gamegroup.module.game.adapter.AdpGameCenter4_3;
 import com.sheep.gamegroup.module.game.model.DownloadInfoHelper;
 import com.sheep.gamegroup.module.game.model.DownloadInfoHelper;
 import com.sheep.gamegroup.util.DownloadUtil;
 import com.sheep.gamegroup.util.DownloadUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.util.ViewUtil;
@@ -163,7 +163,7 @@ public class FgtDownloadManager extends BaseListFragment6<String> {
                 updateView(getActivity(), item, item_dm_btn_tv);
                 updateView(getActivity(), item, item_dm_btn_tv);
             }
             }
         };
         };
-        appFormGameCenterAdapter = new AdpGameCenter4_0(apiRefresh2.getList());
+        appFormGameCenterAdapter = new AdpGameCenter4_3(apiRefresh2.getList());
         return new BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_play_game_list, tagList) {
         return new BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_play_game_list, tagList) {
 
 
             @Override
             @Override

+ 5 - 13
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameGroupMore.java

@@ -18,11 +18,11 @@ import com.sheep.gamegroup.model.entity.GameListTag;
 import com.sheep.gamegroup.model.entity.GameListType;
 import com.sheep.gamegroup.model.entity.GameListType;
 import com.sheep.gamegroup.model.entity.ListTypeList;
 import com.sheep.gamegroup.model.entity.ListTypeList;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.module.game.adapter.AdpGameCenter4_3List;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.ObservableUtil;
 import com.sheep.gamegroup.util.ObservableUtil;
 import com.sheep.gamegroup.util.RefreshUtil;
 import com.sheep.gamegroup.util.RefreshUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.util.ViewUtil;
-import com.sheep.gamegroup.view.adapter.AdpGameCenter3_3List;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
@@ -62,15 +62,9 @@ public class FgtGameGroupMore extends BaseFragment {
         play_game_list_x_rv.setHasFixedSize(true);
         play_game_list_x_rv.setHasFixedSize(true);
         play_game_list_x_rv.setNestedScrollingEnabled(false);
         play_game_list_x_rv.setNestedScrollingEnabled(false);
         play_game_list_x_rv.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
         play_game_list_x_rv.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
-        play_game_list_x_rv.setAdapter(new AdpGameCenter3_3List(getActivity(), gameEntityListx).setShowFirstTop(false));
+        play_game_list_x_rv.setAdapter(new AdpGameCenter4_3List(getActivity(), gameEntityListx).setShowFirstTop(false));
 
 
-        refresh.setOnRefreshListener(new OnRefreshListener() {
-
-            @Override
-            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
-                refreshData();
-            }
-        });
+        refresh.setOnRefreshListener(refreshLayout -> refreshData());
         RefreshUtil.newInstance().publicParameter(refresh, getActivity());
         RefreshUtil.newInstance().publicParameter(refresh, getActivity());
         refresh.autoRefresh();
         refresh.autoRefresh();
     }
     }
@@ -88,10 +82,7 @@ public class FgtGameGroupMore extends BaseFragment {
         //其它tag
         //其它tag
         SheepApp.getInstance().getNetComponent().getApiService().getGameTagList()
         SheepApp.getInstance().getNetComponent().getApiService().getGameTagList()
                 .subscribeOn(Schedulers.io())
                 .subscribeOn(Schedulers.io())
-                .flatMap((Function<BaseMessage, Observable<GameListTag>>) baseMessage -> {
-                    ArrayList<GameListTag> gameListTagList = baseMessage.getDataList(GameListTag.class);
-                    return Observable.fromIterable(gameListTagList);
-                })
+                .flatMap((Function<BaseMessage, Observable<GameListTag>>) baseMessage -> Observable.fromIterable(baseMessage.getDataList(GameListTag.class)))
                 .filter(gameListTag -> gameListTag != null)
                 .filter(gameListTag -> gameListTag != null)
                 .subscribe(new AbsObserver<GameListTag>() {
                 .subscribe(new AbsObserver<GameListTag>() {
 
 
@@ -103,6 +94,7 @@ public class FgtGameGroupMore extends BaseFragment {
     }
     }
 
 
     private int type;
     private int type;
+
     public static FgtGameGroupMore newInstance(int type) {
     public static FgtGameGroupMore newInstance(int type) {
         FgtGameGroupMore fgt = new FgtGameGroupMore();
         FgtGameGroupMore fgt = new FgtGameGroupMore();
         Bundle bundle = new Bundle();
         Bundle bundle = new Bundle();

+ 13 - 12
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtPlayGame.java

@@ -19,6 +19,7 @@ import com.sheep.gamegroup.model.entity.GameListType;
 import com.sheep.gamegroup.model.entity.ListTypeList;
 import com.sheep.gamegroup.model.entity.ListTypeList;
 import com.sheep.gamegroup.model.entity.SlideshowEty;
 import com.sheep.gamegroup.model.entity.SlideshowEty;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.module.game.adapter.AdpGameCenter4_3List;
 import com.sheep.gamegroup.module.game.adapter.AdpGameCenterType;
 import com.sheep.gamegroup.module.game.adapter.AdpGameCenterType;
 import com.sheep.gamegroup.module.game.model.GameCenterType;
 import com.sheep.gamegroup.module.game.model.GameCenterType;
 import com.sheep.gamegroup.module.game.model.PackageTypes;
 import com.sheep.gamegroup.module.game.model.PackageTypes;
@@ -29,7 +30,6 @@ import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.ObservableUtil;
 import com.sheep.gamegroup.util.ObservableUtil;
 import com.sheep.gamegroup.util.RefreshUtil;
 import com.sheep.gamegroup.util.RefreshUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.util.ViewUtil;
-import com.sheep.gamegroup.view.adapter.AdpGameCenter3_3List;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
@@ -42,6 +42,8 @@ import com.youth.banner.loader.ImageLoader;
 import org.afinal.simplecache.ApiKey;
 import org.afinal.simplecache.ApiKey;
 
 
 import java.util.ArrayList;
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
 import java.util.List;
 import java.util.List;
 
 
 import butterknife.BindView;
 import butterknife.BindView;
@@ -67,7 +69,7 @@ public class FgtPlayGame extends BaseFragment {
 
 
     //绵羊新游、免费道具、绵羊推荐、排行榜
     //绵羊新游、免费道具、绵羊推荐、排行榜
     private List<GameCenterType> gameCenterList = new ArrayList<>();
     private List<GameCenterType> gameCenterList = new ArrayList<>();
-    public static final String[] GAME_CENTER_TYPE_NAME = {"绵羊新游", "免费道具", "绵羊推荐", "排行榜"};
+    public static final String[] GAME_CENTER_TYPE_NAME = {"绵羊新游", "会员推荐", "绵羊推荐", "排行榜"};
     public static final String[] GAME_CENTER_TYPE_ICON_NAME = {"myxy", "免费道具", "绵羊推荐", "排行榜"};
     public static final String[] GAME_CENTER_TYPE_ICON_NAME = {"myxy", "免费道具", "绵羊推荐", "排行榜"};
     public static final int[] GAME_CENTER_TYPE_ID = {1, 2, 3, -1};//1:绵羊新游 2:绵羊推荐 3:免费道具
     public static final int[] GAME_CENTER_TYPE_ID = {1, 2, 3, -1};//1:绵羊新游 2:绵羊推荐 3:免费道具
     //预下载和tag列表的数据
     //预下载和tag列表的数据
@@ -108,7 +110,7 @@ public class FgtPlayGame extends BaseFragment {
         play_game_list_x_rv.setHasFixedSize(true);
         play_game_list_x_rv.setHasFixedSize(true);
         play_game_list_x_rv.setNestedScrollingEnabled(false);
         play_game_list_x_rv.setNestedScrollingEnabled(false);
         play_game_list_x_rv.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
         play_game_list_x_rv.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
-        play_game_list_x_rv.setAdapter(new AdpGameCenter3_3List(getActivity(), gameEntityListx).setShowFirstTop(false));
+        play_game_list_x_rv.setAdapter(new AdpGameCenter4_3List(getActivity(), gameEntityListx).setShowFirstTop(false));
 
 
         refresh.setOnRefreshListener(refreshLayout -> refreshData());
         refresh.setOnRefreshListener(refreshLayout -> refreshData());
         RefreshUtil.newInstance().publicParameter(refresh, getActivity());
         RefreshUtil.newInstance().publicParameter(refresh, getActivity());
@@ -123,23 +125,20 @@ public class FgtPlayGame extends BaseFragment {
     }
     }
 
 
 
 
-    //预下载下面的tagList
+    //获取出包类型列表 的tagList
     private void initGameTagList() {
     private void initGameTagList() {
         gameEntityListx.clear();
         gameEntityListx.clear();
         ViewUtil.notifyDataSetChanged(play_game_list_x_rv);
         ViewUtil.notifyDataSetChanged(play_game_list_x_rv);
         //其它tag
         //其它tag
         SheepApp.getInstance().getNetComponent().getApiService().getFindPackageTypeList()
         SheepApp.getInstance().getNetComponent().getApiService().getFindPackageTypeList()
                 .subscribeOn(Schedulers.io())
                 .subscribeOn(Schedulers.io())
-                .flatMap((Function<BaseMessage, Observable<PackageTypes>>) baseMessage -> {
-                    ArrayList<PackageTypes> gameListTagList = baseMessage.getDataList(PackageTypes.class);
-                    return Observable.fromIterable(gameListTagList);
-                })
+                .flatMap((Function<BaseMessage, Observable<PackageTypes>>) baseMessage -> Observable.fromIterable(baseMessage.getDataList(PackageTypes.class)))
                 .filter(gameListTag -> gameListTag != null)
                 .filter(gameListTag -> gameListTag != null)
                 .subscribe(new AbsObserver<PackageTypes>() {
                 .subscribe(new AbsObserver<PackageTypes>() {
 
 
                     @Override
                     @Override
                     public void onNext(PackageTypes gameListTag) {
                     public void onNext(PackageTypes gameListTag) {
-                        initGameList(play_game_list_x_rv, gameEntityListx, gameListTag.toGameListType());
+                        initGameList(play_game_list_x_rv, gameEntityListx, gameListTag);
                     }
                     }
                 });
                 });
     }
     }
@@ -235,8 +234,9 @@ public class FgtPlayGame extends BaseFragment {
         //结束轮播
         //结束轮播
         banner.stopAutoPlay();
         banner.stopAutoPlay();
     }
     }
-
-    private void initGameList(final RecyclerView playGameListRv, final List<ListTypeList<GameEntity, GameListType>> gameEntityListList, final GameListType gameListType) {
+    private Comparator<ListTypeList<GameEntity, GameListType>> comparator = (item1, item2) -> item2.getSort() - item1.getSort();
+    private void initGameList(final RecyclerView playGameListRv, final List<ListTypeList<GameEntity, GameListType>> gameEntityListList, PackageTypes packageTypes) {
+        GameListType gameListType = packageTypes.toGameListType();
         if (gameListType == null) {
         if (gameListType == null) {
             return;
             return;
         }
         }
@@ -248,7 +248,8 @@ public class FgtPlayGame extends BaseFragment {
                     public void onNext(BaseMessage baseMessage) {
                     public void onNext(BaseMessage baseMessage) {
                         List<GameEntity> newList = baseMessage.getDatas(GameEntity.class);
                         List<GameEntity> newList = baseMessage.getDatas(GameEntity.class);
                         if (!ListUtil.isEmpty(newList)) {
                         if (!ListUtil.isEmpty(newList)) {
-                            gameEntityListList.add(new ListTypeList<>(gameListType, newList));
+                            gameEntityListList.add(new ListTypeList<>(gameListType, newList).setSort(packageTypes.getSort()));
+                            Collections.sort(gameEntityListList, comparator);//排序
                             ViewUtil.notifyDataSetChanged(playGameListRv);
                             ViewUtil.notifyDataSetChanged(playGameListRv);
                         }
                         }
                         notifyDataSetChanged();
                         notifyDataSetChanged();

+ 9 - 0
app/src/main/java/com/sheep/gamegroup/module/game/model/PackageTypes.java

@@ -18,6 +18,7 @@ public class PackageTypes {
     private int id;
     private int id;
     private String name;
     private String name;
     private int package_type;
     private int package_type;
+    private int sort;//倒序
 
 
     public String getCreated_at() {
     public String getCreated_at() {
         return created_at;
         return created_at;
@@ -51,6 +52,14 @@ public class PackageTypes {
         this.package_type = package_type;
         this.package_type = package_type;
     }
     }
 
 
+    public int getSort() {
+        return sort;
+    }
+
+    public void setSort(int sort) {
+        this.sort = sort;
+    }
+
     public GameListType toGameListType() {
     public GameListType toGameListType() {
         GameListType gameListType = new GameListType();
         GameListType gameListType = new GameListType();
         gameListType.setType(package_type);
         gameListType.setType(package_type);

+ 10 - 9
app/src/main/res/layout/item_game_center_4_0.xml

@@ -4,16 +4,15 @@
     android:layout_height="wrap_content"
     android:layout_height="wrap_content"
     android:layout_gravity="center"
     android:layout_gravity="center"
     android:orientation="vertical"
     android:orientation="vertical"
-    android:layout_marginStart="10dp"
-    android:paddingTop="20dp"
-    android:paddingBottom="20dp">
+    android:paddingTop="16dp"
+    android:paddingBottom="16dp">
 
 
     <ImageView
     <ImageView
         android:id="@+id/item_hot_welfare_iv"
         android:id="@+id/item_hot_welfare_iv"
-        android:layout_width="73dp"
-        android:layout_height="73dp"
-        android:layout_marginStart="6dp"
-        android:layout_marginEnd="6dp"
+        android:layout_width="62dp"
+        android:layout_height="62dp"
+        android:layout_marginStart="8dp"
+        android:layout_marginEnd="8dp"
         android:layout_gravity="center"
         android:layout_gravity="center"
         android:src="@drawable/icon_lj" />
         android:src="@drawable/icon_lj" />
 
 
@@ -21,10 +20,12 @@
         android:id="@+id/item_hot_welfare_tv"
         android:id="@+id/item_hot_welfare_tv"
         android:layout_width="match_parent"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="18dp"
+        android:layout_marginTop="8dp"
+        android:paddingStart="4dp"
+        android:paddingEnd="4dp"
         android:ellipsize="end"
         android:ellipsize="end"
         android:gravity="center"
         android:gravity="center"
         android:singleLine="true"
         android:singleLine="true"
         android:textColor="#333333"
         android:textColor="#333333"
-        android:textSize="15sp" />
+        android:textSize="13sp" />
 </LinearLayout>
 </LinearLayout>