Przeglądaj źródła

添加游戏福利专区入口与刷新福利到主页与游戏主页

zengjiebin 7 lat temu
rodzic
commit
294f1186c2

+ 29 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/Release_task.java

@@ -5,6 +5,7 @@ import android.text.TextUtils;
 import com.kfzs.duanduan.utils.NumberFormatUtils;
 import com.sheep.gamegroup.helper.DownloadHelper;
 import com.sheep.gamegroup.util.TimeUtil;
+import com.sheep.gamegroup.util.string.SpannableSb;
 
 import java.io.Serializable;
 import java.util.Locale;
@@ -468,4 +469,32 @@ public class Release_task implements Serializable {
     public String getRewardMsg() {
         return String.format(Locale.CHINA, "+%s元%s", getBonusText(), getRewardTypeNameMsg());
     }
+
+
+
+    //以下为福利相关方法
+
+
+//      `boon_content` varchar(255) NOT NULL DEFAULT '' COMMENT '福利内容',
+    private String boon_content;
+
+    public void setBoon_content(String boon_content) {
+        this.boon_content = boon_content;
+    }
+
+    public String getBoon_content() {
+        return boon_content;
+    }
+
+
+
+
+    //获取福利的展示内容
+    public CharSequence getWelfareInfo() {
+        return String.format(Locale.CHINA, "内容:%s", boon_content);
+    }
+    //获取福利的价值
+    public CharSequence getWelfareValue() {
+        return new SpannableSb().append("价值:").append(String.format(Locale.CHINA, "¥%s", bonus), "#FD2D54").getSsb();
+    }
 }

+ 58 - 0
app/src/main/java/com/sheep/gamegroup/module/game/adapter/AdpRefreshWelfare.java

@@ -0,0 +1,58 @@
+package com.sheep.gamegroup.module.game.adapter;
+
+import android.support.annotation.Nullable;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.sheep.gamegroup.model.entity.Release_task;
+import com.sheep.gamegroup.model.entity.TaskEty;
+import com.sheep.gamegroup.util.GlideImageLoader;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+
+import java.util.List;
+
+/**
+ * Created by realicing on 2019/3/26.
+ * realicing@sina.com
+ */
+public class AdpRefreshWelfare extends BaseQuickAdapter<Release_task, BaseViewHolder> {
+
+    public AdpRefreshWelfare(int layoutResId, @Nullable List<Release_task> data) {
+        super(layoutResId, data);
+    }
+
+    private View.OnClickListener changeOne;
+
+    public AdpRefreshWelfare setChangeOne(View.OnClickListener changeOne) {
+        this.changeOne = changeOne;
+        return this;
+    }
+
+    @Override
+    protected void convert(BaseViewHolder viewHolder, Release_task release_task) {
+        ImageView item_icon_iv = viewHolder.itemView.findViewById(R.id.item_icon_iv);
+        TextView item_name_tv = viewHolder.itemView.findViewById(R.id.item_name_tv);
+        TextView item_info_tv = viewHolder.itemView.findViewById(R.id.item_info_tv);
+        TextView item_value_tv = viewHolder.itemView.findViewById(R.id.item_value_tv);
+        ImageView item_change_one_iv = viewHolder.itemView.findViewById(R.id.item_change_one_iv);
+        TextView item_change_one_tv = viewHolder.itemView.findViewById(R.id.item_change_one_tv);
+
+        if(release_task == null){
+            return;
+        }
+        TaskEty taskEty = release_task.getTask();
+        if(taskEty == null){
+            return;
+        }
+        ViewUtil.setGameImage(item_icon_iv, taskEty.getIcon());
+        ViewUtil.setText(item_name_tv, release_task.getName());
+        ViewUtil.setText(item_info_tv, release_task.getWelfareInfo());
+        ViewUtil.setText(item_value_tv, release_task.getWelfareValue());
+        ViewUtil.setOnClickListener(item_change_one_iv, changeOne);
+        ViewUtil.setOnClickListener(item_change_one_tv, changeOne);
+    }
+}

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

@@ -23,6 +23,7 @@ import com.sheep.gamegroup.module.game.adapter.AdpGameCenter4_3List;
 import com.sheep.gamegroup.module.game.adapter.AdpGameCenterType;
 import com.sheep.gamegroup.module.game.model.GameCenterType;
 import com.sheep.gamegroup.module.game.model.GamePortTypes;
+import com.sheep.gamegroup.module.game.util.HpRefreshWelfareHelper;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.Jump2View;
@@ -82,6 +83,10 @@ public class FgtPlayGame extends BaseFragment {
         return R.layout.fgt_play_game;
     }
 
+    //游戏福利专区入口与刷新福利
+    @BindView(R.id.hp_refresh_welfare_box)
+    View hp_refresh_welfare_box;
+    private HpRefreshWelfareHelper mHpRefreshWelfareHelper;//刷新福利的帮助类
     @Override
     public void onViewCreated() {
         //banner
@@ -89,6 +94,11 @@ public class FgtPlayGame extends BaseFragment {
         bannerLayoutParams.height = G.WIDTH * 25 / 72;
         banner.setLayoutParams(bannerLayoutParams);
 
+        //玩转游戏  游戏福利专区入口
+
+        mHpRefreshWelfareHelper = new HpRefreshWelfareHelper(hp_refresh_welfare_box);
+
+
         //绵羊新游、免费道具、绵羊推荐、排行榜
         int index = 0;
         for (String name : GAME_CENTER_TYPE_NAME) {
@@ -121,6 +131,8 @@ public class FgtPlayGame extends BaseFragment {
     private void refreshData() {
         initBanner();
         initGameTagList();
+        if(mHpRefreshWelfareHelper != null)
+            mHpRefreshWelfareHelper.refreshData();
     }
 
 

+ 74 - 0
app/src/main/java/com/sheep/gamegroup/module/game/util/HpRefreshWelfareHelper.java

@@ -0,0 +1,74 @@
+package com.sheep.gamegroup.module.game.util;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.View;
+
+import com.sheep.gamegroup.model.entity.Release_task;
+import com.sheep.gamegroup.module.game.adapter.AdpRefreshWelfare;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.DataKey;
+import com.sheep.gamegroup.util.DataUtil;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+
+import java.util.List;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+
+/**
+ * Created by realicing on 2019/3/26.
+ * realicing@sina.com
+ */
+public class HpRefreshWelfareHelper {
+
+//    private View hp_refresh_welfare_box;
+
+    public HpRefreshWelfareHelper(View hp_refresh_welfare_box) {
+//        this.hp_refresh_welfare_box = hp_refresh_welfare_box;
+        ButterKnife.bind(this, hp_refresh_welfare_box);
+        initRefreshWelfareList();
+    }
+    //游戏福利入口
+    @BindView(R.id.hp_game_welfare_entrance)
+    View hp_game_welfare_entrance;
+    //刷新福利
+    @BindView(R.id.hp_refresh_welfare)
+    RecyclerView hp_refresh_welfare;
+
+    @OnClick(R.id.hp_gwe_tv2)
+    public void toActWelfareSpecialArea() {//跳转到福利专区
+        Jump2View.getInstance().toActWelfareSpecialArea();
+    }
+
+    private List<Release_task> refreshWelfareList = ListUtil.emptyList();
+    //初始化刷新福利
+    private void initRefreshWelfareList() {
+        hp_refresh_welfare.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
+        hp_refresh_welfare.setHasFixedSize(true);
+        hp_refresh_welfare.setNestedScrollingEnabled(false);
+        hp_refresh_welfare.setAdapter(new AdpRefreshWelfare(R.layout.item_hp_refresh_welfare, refreshWelfareList).setChangeOne(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                refreshData();
+            }
+        }));
+    }
+
+    public void refreshData() {
+        //刷新福利
+        CommonUtil.getInstance().refreshWelfare(commendTask -> {
+            if (commendTask != null) {
+                DataUtil.putAsInt(DataKey.KEY_REFRESH_WELFARE_ORDER, commendTask.getOrder());
+                refreshWelfareList.clear();
+                refreshWelfareList.add(commendTask.getM());
+                ViewUtil.notifyDataSetChanged(hp_refresh_welfare);
+            }
+            ViewUtil.setVisibility(hp_game_welfare_entrance, commendTask != null);
+        });
+    }
+}

+ 0 - 24
app/src/main/java/com/sheep/gamegroup/module/home/adapter/AdpRefreshWelfare.java

@@ -1,24 +0,0 @@
-package com.sheep.gamegroup.module.home.adapter;
-
-import android.support.annotation.Nullable;
-
-import com.chad.library.adapter.base.BaseQuickAdapter;
-import com.chad.library.adapter.base.BaseViewHolder;
-import com.sheep.gamegroup.model.entity.Release_task;
-
-import java.util.List;
-
-/**
- * Created by realicing on 2019/3/26.
- * realicing@sina.com
- */
-public class AdpRefreshWelfare extends BaseQuickAdapter<Release_task, BaseViewHolder> {
-    public AdpRefreshWelfare(int layoutResId, @Nullable List<Release_task> data) {
-        super(layoutResId, data);
-    }
-
-    @Override
-    protected void convert(BaseViewHolder baseViewHolder, Release_task release_task) {
-
-    }
-}

+ 9 - 33
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtSmallSheep.java

@@ -53,7 +53,6 @@ import com.sheep.gamegroup.event.BigEvent;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.BulletinEnty;
 import com.sheep.gamegroup.model.entity.CashAwarsEntity;
-import com.sheep.gamegroup.model.entity.CommendTask;
 import com.sheep.gamegroup.model.entity.HomeListEntity;
 import com.sheep.gamegroup.model.entity.Lp;
 import com.sheep.gamegroup.model.entity.MessageUnReadEntity;
@@ -67,8 +66,9 @@ import com.sheep.gamegroup.model.entity.TaskAcceptedEty;
 import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.model.util.ShowRedDot;
+import com.sheep.gamegroup.module.game.util.HpRefreshWelfareHelper;
 import com.sheep.gamegroup.module.home.adapter.AdpHomeList;
-import com.sheep.gamegroup.module.home.adapter.AdpRefreshWelfare;
+import com.sheep.gamegroup.module.game.adapter.AdpRefreshWelfare;
 import com.sheep.gamegroup.module.skin.util.SkinUtil;
 import com.sheep.gamegroup.presenter.SmallSheepContract;
 import com.sheep.gamegroup.presenter.SmallSheepPresenter;
@@ -89,7 +89,6 @@ import com.sheep.gamegroup.util.ViewHolder;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.util.string.SpannableSb;
 import com.sheep.gamegroup.util.viewHelper.LayoutParamsUtil;
-import com.sheep.gamegroup.view.activity.ActMain;
 import com.sheep.gamegroup.view.activity.ActMsg;
 import com.sheep.gamegroup.view.activity.ActWebX5SBD;
 import com.sheep.gamegroup.view.activity.NotificationsUtils;
@@ -569,6 +568,11 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
     private void initBannerHeight(){
         bannerHeight = G.WIDTH  * 17 / 40;
     }
+
+    //游戏福利专区入口与刷新福利
+    @BindView(R.id.hp_refresh_welfare_box)
+    View hp_refresh_welfare_box;
+    private HpRefreshWelfareHelper mHpRefreshWelfareHelper;//刷新福利的帮助类
     public void initView() {
         try {
             EventBus.getDefault().register(this);
@@ -582,7 +586,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
                 .build()
                 .inject(this);
         recyclerInitView();
-        initRefreshWelfareList();
+        mHpRefreshWelfareHelper = new HpRefreshWelfareHelper(hp_refresh_welfare_box);
 //        ViewGroup.LayoutParams bannerLayoutParams = banner.getLayoutParams();
         initBannerHeight();
 //        bannerLayoutParams.height = bannerHeight;//图片比例发生变化 :306*720
@@ -904,15 +908,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
                 }
             }
         });
-        //刷新福利
-        CommonUtil.getInstance().refreshWelfare(commendTask -> {
-            if (commendTask != null) {
-                DataUtil.putAsInt(DataKey.KEY_REFRESH_WELFARE_ORDER, commendTask.getOrder());
-                refreshWelfareList.add(commendTask.getM());
-                ViewUtil.notifyDataSetChanged(hp_refresh_welfare);
-            }
-            ViewUtil.setVisibility(hp_game_welfare_entrance, commendTask != null);
-        });
+        mHpRefreshWelfareHelper.refreshData();
         if (!isFirst) {
             for (int i = 0; i < mAdapter.getCount(); i++) {
                 FgtHomeTaskReleaseList item = (FgtHomeTaskReleaseList) mAdapter.getItem(i);
@@ -924,26 +920,6 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
 
     private boolean isFirst = true;
 
-    //游戏福利入口
-    @BindView(R.id.hp_game_welfare_entrance)
-    View hp_game_welfare_entrance;
-    //刷新福利
-    @BindView(R.id.hp_refresh_welfare)
-    RecyclerView hp_refresh_welfare;
-    private List<Release_task> refreshWelfareList = ListUtil.emptyList();
-    //初始化刷新福利
-    private void initRefreshWelfareList() {
-        hp_refresh_welfare.setLayoutManager(new LinearLayoutManager(activity));
-        hp_refresh_welfare.setHasFixedSize(true);
-        hp_refresh_welfare.setNestedScrollingEnabled(false);
-        hp_refresh_welfare.setAdapter(new AdpRefreshWelfare(R.layout.item_hp_refresh_welfare, refreshWelfareList));
-    }
-
-    @OnClick(R.id.hp_gwe_tv2)
-    public void toActWelfareSpecialArea() {//跳转到福利专区
-        Jump2View.getInstance().toActWelfareSpecialArea();
-    }
-
     /**
      * recyclerview
      */

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

@@ -19,6 +19,11 @@
 
             <include layout="@layout/homepage_item_banner" />
 
+            <include
+                android:id="@+id/hp_refresh_welfare_box"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                layout="@layout/inclue_hp_refresh_welfare_box" />
             <android.support.v7.widget.RecyclerView
                 android:id="@+id/play_game_center_type_list"
                 android:layout_width="match_parent"

+ 3 - 16
app/src/main/res/layout/homepage_act_layout.xml

@@ -103,25 +103,12 @@
                     <include layout="@layout/homepage_item_get_award" />
                 </LinearLayout>
 
-                <LinearLayout
+                <include
                     android:id="@+id/hp_refresh_welfare_box"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_below="@id/home_award_container"
-                    android:background="@color/white">
-
-                    <include
-                        android:id="@+id/hp_game_welfare_entrance"
-                        layout="@layout/hp_game_welfare_entrance" />
-
-                    <android.support.v7.widget.RecyclerView
-                        android:id="@+id/hp_refresh_welfare"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:orientation="vertical"
-                        android:paddingLeft="3dp"
-                        android:paddingRight="3dp" />
-                </LinearLayout>
+                    layout="@layout/inclue_hp_refresh_welfare_box"
+                    android:layout_below="@id/home_award_container" />
 
                 <LinearLayout
                     android:id="@+id/home_vp_ll"

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

@@ -58,7 +58,7 @@
         android:minWidth="14dp"
         android:paddingStart="4dp"
         android:paddingEnd="4dp"
-        android:visibility="invisible"
+        android:visibility="gone"
         android:text="0"
         android:textColor="@color/white"
         android:textSize="9sp" />

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

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_below="@id/home_award_container"
+    android:background="@color/white"
+    android:orientation="vertical">
+
+    <include
+        android:id="@+id/hp_game_welfare_entrance"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        layout="@layout/hp_game_welfare_entrance" />
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/hp_refresh_welfare"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:paddingLeft="3dp"
+        android:paddingRight="3dp" />
+</LinearLayout>

+ 71 - 260
app/src/main/res/layout/item_hp_refresh_welfare.xml

@@ -1,274 +1,85 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<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:orientation="vertical">
+    android:layout_height="wrap_content">
 
-    <RelativeLayout
-        android:id="@+id/task_top"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="@dimen/content_padding_10"
-        android:orientation="horizontal">
-
-        <ImageView
-            android:id="@+id/item_title_iv"
-            android:layout_width="@dimen/content_padding_20"
-            android:layout_height="@dimen/content_padding_20"
-            android:layout_marginStart="12dp"
-            android:src="@mipmap/task_ing_icon" />
-
-        <TextView
-            android:id="@+id/item_title_tv"
-            android:layout_width="match_parent"
-            android:layout_height="@dimen/content_padding_20"
-            android:layout_marginStart="@dimen/content_padding_small"
-            android:layout_marginEnd="12dp"
-            android:layout_toEndOf="@+id/item_title_iv"
-            android:gravity="center_vertical"
-            android:text="进行中"
-            android:textColor="@color/black"
-            android:textSize="15sp" />
-
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="0.5dp"
-            android:layout_marginTop="33dp"
-            android:background="@color/gray_F0F0F0" />
-    </RelativeLayout>
-
-
-    <android.support.constraint.ConstraintLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
+    <ImageView
+        android:id="@+id/item_icon_iv"
+        android:layout_width="68dp"
+        android:layout_height="68dp"
+        android:src="@drawable/icon_lj"
         android:layout_marginStart="12dp"
-        android:layout_marginEnd="12dp">
-
-        <View
-            android:id="@+id/item_top_v"
-            android:layout_width="match_parent"
-            android:layout_height="@dimen/content_padding_10" />
-
-        <ImageView
-            android:id="@+id/item_icon_iv"
-            android:layout_width="70dp"
-            android:layout_height="70dp"
-            android:src="@drawable/icon_lj"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toBottomOf="@id/item_top_v" />
-
-
-        <TextView
-            android:id="@+id/end_of_time_tv"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/content_padding_4"
-            android:layout_marginTop="55dp"
-            android:layout_marginEnd="@dimen/content_padding_4"
-            android:background="@drawable/shape_ash_stroke_white_solid_rectangle"
-            android:gravity="center"
-            android:lines="1"
-            android:textColor="#989898"
-            android:textSize="12sp"
-            android:visibility="gone"
-            app:layout_constraintEnd_toEndOf="@+id/item_icon_iv"
-            app:layout_constraintStart_toStartOf="@+id/item_icon_iv"
-            app:layout_constraintTop_toBottomOf="@id/item_top_v" />
-
-        <LinearLayout
-            android:layout_width="0dp"
-            android:layout_height="70dp"
-            android:layout_marginStart="@dimen/content_padding"
-            android:orientation="vertical"
-            app:layout_constraintEnd_toStartOf="@+id/task_type_tv"
-            app:layout_constraintStart_toEndOf="@+id/item_icon_iv"
-            app:layout_constraintTop_toBottomOf="@id/item_top_v">
-
-            <TextView
-                android:id="@+id/item_name_tv"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:ellipsize="middle"
-                android:gravity="start"
-                android:maxLines="2"
-                android:text=""
-                android:textColor="#444444"
-                android:textSize="14sp" />
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                android:layout_weight="3" />
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:gravity="center_vertical"
-                android:orientation="horizontal">
-
-                <TextView
-                    android:id="@+id/item_num_tv"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text=""
-                    android:textColor="#cc8e8e8e"
-                    android:textSize="10sp" />
-
-                <TextView
-                    android:id="@+id/item_num_tv1"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="@dimen/content_padding"
-                    android:singleLine="true"
-                    android:text=""
-                    android:textColor="#cc8e8e8e"
-                    android:textSize="10sp"
-                    android:visibility="gone" />
-
-                <TextView
-                    android:id="@+id/item_num_tv2"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="@dimen/content_padding"
-                    android:singleLine="true"
-                    android:text=""
-                    android:textColor="#cc8e8e8e"
-                    android:textSize="10sp"
-                    android:visibility="gone" />
-            </LinearLayout>
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                android:layout_weight="1" />
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/content_padding_2"
-                android:layout_marginEnd="@dimen/content_padding_8"
-                android:orientation="horizontal">
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
 
-                <TextView
-                    android:id="@+id/item_date_tv"
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1"
-                    android:lines="1"
-                    android:text=""
-                    android:textColor="#cc8e8e8e"
-                    android:textSize="10sp" />
 
-                <ImageView
-                    android:id="@+id/item_date_question_img"
-                    android:layout_width="15dp"
-                    android:layout_height="15dp"
-                    android:src="@mipmap/task_game_qustion_icon"
-                    android:visibility="gone"
-                    app:layout_constraintEnd_toEndOf="parent"
-                    app:layout_constraintStart_toEndOf="@+id/item_date_tv" />
-            </LinearLayout>
-        </LinearLayout>
+    <ImageView
+        android:id="@+id/item_song_iv"
+        android:layout_width="21dp"
+        android:layout_height="21dp"
+        android:layout_marginStart="33dp"
+        android:src="@mipmap/ic_song"
+        app:layout_constraintStart_toEndOf="@id/item_icon_iv"
+        app:layout_constraintTop_toTopOf="@id/item_icon_iv" />
 
+    <TextView
+        android:id="@+id/item_name_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="5dp"
+        android:text="王者荣耀皮肤"
+        android:textColor="#ff333333"
+        android:textSize="14sp"
+        app:layout_constraintBottom_toBottomOf="@id/item_song_iv"
+        app:layout_constraintStart_toEndOf="@id/item_song_iv"
+        app:layout_constraintTop_toTopOf="@id/item_song_iv" />
 
-        <TextView
-            android:id="@+id/task_type_tv"
-            style="@style/style_button_find"
-            android:layout_marginTop="5dp"
-            android:text="@string/task_cancel"
-            android:visibility="invisible"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintTop_toBottomOf="@id/item_top_v" />
-
-        <TextView
-            android:id="@+id/detail_task_tv_center"
-            style="@style/style_button_find"
-            android:layout_centerInParent="true"
-            android:text="@string/task_cancel"
-            android:visibility="gone"
-            app:layout_constraintBottom_toBottomOf="@+id/item_icon_iv"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintTop_toBottomOf="@id/item_top_v" />
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="70dp"
-            android:gravity="end"
-            android:orientation="vertical"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintTop_toBottomOf="@id/item_top_v">
-
-            <TextView
-                android:id="@+id/item_money"
-                android:layout_width="@dimen/find_bt_with"
-                android:layout_height="wrap_content"
-                android:gravity="center"
-                android:text="+10元"
-                android:textColor="@color/txt_red"
-                android:textSize="18sp" />
-            <View
-                android:layout_width="1dp"
-                android:layout_height="0dp"
-                android:layout_weight="1" />
-
-            <TextView
-                android:id="@+id/item_money_vip_tv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:gravity="center"
-                android:minWidth="@dimen/find_bt_with"
-                android:text="会员:+11元"
-                android:textColor="#C3995E"
-                android:textSize="10sp"
-                android:visibility="gone"/>
-            <View
-                android:layout_width="1dp"
-                android:layout_height="0dp"
-                android:layout_weight="1" />
-
-            <RelativeLayout
-                android:id="@+id/detail_task_layout"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content">
-
-                <TextView
-                    android:id="@+id/detail_task_tv"
-                    style="@style/style_button_find"
-                    android:text="@string/task_cancel" />
-
-                <TextView
-                    android:id="@+id/detail_task_tv_down"
-                    style="@style/style_button_find"
-                    android:text="@string/task_cancel"
-                    android:visibility="gone" />
-
-            </RelativeLayout>
-        </LinearLayout>
-    </android.support.constraint.ConstraintLayout>
+    <TextView
+        android:id="@+id/item_info_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="20dp"
+        android:text="内容:xx皮肤"
+        android:textColor="#ff999999"
+        android:textSize="12sp"
+        app:layout_constraintStart_toStartOf="@id/item_song_iv"
+        app:layout_constraintTop_toBottomOf="@id/item_song_iv" />
 
     <TextView
-        android:layout_width="match_parent"
+        android:id="@+id/item_value_tv"
+        android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="12dp"
-        android:layout_marginTop="16dp"
+        android:layout_marginEnd="17dp"
+        android:text="价值:¥566"
+        android:textColor="#ff333333"
+        android:textSize="12sp"
+        app:layout_constraintBottom_toBottomOf="@id/item_song_iv"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="@id/item_song_iv" />
+
+    <ImageView
+        android:id="@+id/item_change_one_iv"
+        android:layout_width="22dp"
+        android:layout_height="wrap_content"
+        android:adjustViewBounds="true"
+        android:padding="5dp"
+        android:scaleType="fitXY"
+        android:src="@mipmap/ic_change_one"
         android:layout_marginEnd="12dp"
-        android:background="@drawable/sp_rectangle_bg_gray_radius"
-        android:padding="@dimen/content_padding_small"
-        android:text="@string/tip_finish_task_in_time_or_repeat"
-        android:textColor="@color/txt_black_8e8e8e"
-        android:textSize="@dimen/text_size_10"
-        android:visibility="gone" />
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/content_padding_10" />
+        app:layout_constraintBottom_toBottomOf="@id/item_info_tv"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="@id/item_info_tv" />
 
-    <View
-        android:id="@+id/line_tv"
-        android:layout_width="match_parent"
-        android:layout_height="0.5dp"
-        android:layout_marginStart="12dp"
-        android:layout_marginEnd="12dp"
-        android:background="@color/gray_F0F0F0" />
-</LinearLayout>
+    <TextView
+        android:id="@+id/item_change_one_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="换一个"
+        android:textColor="#ff333333"
+        android:textSize="12sp"
+        android:layout_marginEnd="5dp"
+        app:layout_constraintBottom_toBottomOf="@id/item_info_tv"
+        app:layout_constraintEnd_toStartOf="@id/item_change_one_iv"
+        app:layout_constraintTop_toTopOf="@id/item_info_tv" />
+</android.support.constraint.ConstraintLayout>

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


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