Procházet zdrojové kódy

添加游戏福利专区界面

zengjiebin před 7 roky
rodič
revize
f97b79aed2

+ 76 - 39
app/src/main/java/com/sheep/gamegroup/model/entity/Release_task.java

@@ -13,42 +13,42 @@ import java.util.Locale;
 /**
  * 获取已经发布任务
  * Created by ljy on 2018/3/20.
- *
+ * <p>
  * CREATE TABLE `release_task` (
- *   `id` int(11) NOT NULL AUTO_INCREMENT,
- *   `task_id` int(7) DEFAULT NULL COMMENT '任务id',
- *   `release_num` int(7) DEFAULT NULL COMMENT '发布数量',
- *   `last_num` int(7) DEFAULT NULL COMMENT '剩余数量',
- *   `create_time` bigint(20) DEFAULT NULL COMMENT '创建时间',
- *   `update_time` bigint(20) DEFAULT NULL COMMENT '更新时间',
- *   `online_time` bigint(20) DEFAULT NULL COMMENT '上线时间',
- *   `deadline` bigint(20) DEFAULT NULL COMMENT '截止时间',
- *   `remarks` varchar(100) DEFAULT NULL COMMENT '备注',
- *   `bonus` decimal(10,2) DEFAULT NULL COMMENT '任务奖金',
- *   `status` int(3) DEFAULT NULL COMMENT '1手动上线 2自动上线  3手动下线 4自动下线 5等待上线',
- *   `name` varchar(120) DEFAULT NULL COMMENT '任务名称(默认为task的任务名称)',
- *   `online_type` int(3) DEFAULT '1' COMMENT '1添加马上上线 2定时上线',
- *   `duration` bigint(20) DEFAULT NULL COMMENT '秒为单位(如果task的任务类型为时长任务时必须要)',
- *   `is_hot` tinyint(4) DEFAULT '0' COMMENT '是否热门任务 0不是 1是',
- *   `is_recommend` tinyint(4) DEFAULT '0' COMMENT '是否推荐任务 0不是 1是',
- *   `order` int(11) DEFAULT NULL COMMENT '排序 越大越靠前',
- *   `platform` tinyint(4) DEFAULT NULL COMMENT '平台 1andriod 2ios',
- *   `cancel_duration` int(11) DEFAULT NULL COMMENT '自动取消时间段',
- *   `demo_time` int(11) DEFAULT NULL COMMENT '试玩时长',
- *   `is_succession` int(11) DEFAULT NULL COMMENT '是否为连续任务 0不是 1是',
- *   `exclude` int(11) DEFAULT NULL COMMENT '是否为互斥任务:  0 否  1 是',
- *   `consume_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '最低消费金额(游戏消费类型任务必填,达到最低消费才送相应比例的金额)',
- *   `gift_ratio` int(11) NOT NULL DEFAULT '0' COMMENT '赠送比例(游戏消费类型任务必填,取值0到100)',
- *   `cash_task` tinyint(4) DEFAULT '1' COMMENT '1:现金任务 2:福利任务',
- *   `key_word` varchar(128) NOT NULL DEFAULT '' COMMENT 'ASO任务:关键词 其他任务为空',
- *   `ranking` int(11) NOT NULL DEFAULT '0' COMMENT 'ASO任务:排名 其他任务为0',
- *   `difficulty` int(11) DEFAULT '1' COMMENT '难度 从小到大 难度增大',
- *   `cost_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '成本单价',
- *   `profit_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '平台利润',
- *   `vip_bonus` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '会员获得奖励',
- *   PRIMARY KEY (`id`),
- *   KEY `release_task_task_id_index` (`task_id`),
- *   KEY `release_task_online_type_index` (`online_type`)
+ * `id` int(11) NOT NULL AUTO_INCREMENT,
+ * `task_id` int(7) DEFAULT NULL COMMENT '任务id',
+ * `release_num` int(7) DEFAULT NULL COMMENT '发布数量',
+ * `last_num` int(7) DEFAULT NULL COMMENT '剩余数量',
+ * `create_time` bigint(20) DEFAULT NULL COMMENT '创建时间',
+ * `update_time` bigint(20) DEFAULT NULL COMMENT '更新时间',
+ * `online_time` bigint(20) DEFAULT NULL COMMENT '上线时间',
+ * `deadline` bigint(20) DEFAULT NULL COMMENT '截止时间',
+ * `remarks` varchar(100) DEFAULT NULL COMMENT '备注',
+ * `bonus` decimal(10,2) DEFAULT NULL COMMENT '任务奖金',
+ * `status` int(3) DEFAULT NULL COMMENT '1手动上线 2自动上线  3手动下线 4自动下线 5等待上线',
+ * `name` varchar(120) DEFAULT NULL COMMENT '任务名称(默认为task的任务名称)',
+ * `online_type` int(3) DEFAULT '1' COMMENT '1添加马上上线 2定时上线',
+ * `duration` bigint(20) DEFAULT NULL COMMENT '秒为单位(如果task的任务类型为时长任务时必须要)',
+ * `is_hot` tinyint(4) DEFAULT '0' COMMENT '是否热门任务 0不是 1是',
+ * `is_recommend` tinyint(4) DEFAULT '0' COMMENT '是否推荐任务 0不是 1是',
+ * `order` int(11) DEFAULT NULL COMMENT '排序 越大越靠前',
+ * `platform` tinyint(4) DEFAULT NULL COMMENT '平台 1andriod 2ios',
+ * `cancel_duration` int(11) DEFAULT NULL COMMENT '自动取消时间段',
+ * `demo_time` int(11) DEFAULT NULL COMMENT '试玩时长',
+ * `is_succession` int(11) DEFAULT NULL COMMENT '是否为连续任务 0不是 1是',
+ * `exclude` int(11) DEFAULT NULL COMMENT '是否为互斥任务:  0 否  1 是',
+ * `consume_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '最低消费金额(游戏消费类型任务必填,达到最低消费才送相应比例的金额)',
+ * `gift_ratio` int(11) NOT NULL DEFAULT '0' COMMENT '赠送比例(游戏消费类型任务必填,取值0到100)',
+ * `cash_task` tinyint(4) DEFAULT '1' COMMENT '1:现金任务 2:福利任务',
+ * `key_word` varchar(128) NOT NULL DEFAULT '' COMMENT 'ASO任务:关键词 其他任务为空',
+ * `ranking` int(11) NOT NULL DEFAULT '0' COMMENT 'ASO任务:排名 其他任务为0',
+ * `difficulty` int(11) DEFAULT '1' COMMENT '难度 从小到大 难度增大',
+ * `cost_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '成本单价',
+ * `profit_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '平台利润',
+ * `vip_bonus` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '会员获得奖励',
+ * PRIMARY KEY (`id`),
+ * KEY `release_task_task_id_index` (`task_id`),
+ * KEY `release_task_online_type_index` (`online_type`)
  * ) ENGINE=InnoDB AUTO_INCREMENT=1589 DEFAULT CHARSET=utf8 COMMENT='发布任务';
  */
 
@@ -444,7 +444,7 @@ public class Release_task implements Serializable {
     }
 
     public String getFuliContent() {
-        return  String.format(Locale.CHINA, "恭喜您已获得%s元奖励,需最低消费%d,可抵奖励%s。羊羊给的奖励,赶紧前往购买吧!", getBonusText(), consume_amount, NumberFormatUtils.retainMost2(gift_ratio * consume_amount / 100));
+        return String.format(Locale.CHINA, "恭喜您已获得%s元奖励,需最低消费%d,可抵奖励%s。羊羊给的奖励,赶紧前往购买吧!", getBonusText(), consume_amount, NumberFormatUtils.retainMost2(gift_ratio * consume_amount / 100));
     }
 
     /**
@@ -453,6 +453,7 @@ public class Release_task implements Serializable {
     public boolean isAppointTask() {
         return is_appoint == 1;
     }
+
     /**
      * 要展示的定向内容
      */
@@ -464,6 +465,7 @@ public class Release_task implements Serializable {
      * +5元
      * or
      * +5元(元宝)
+     *
      * @return
      */
     public String getRewardMsg() {
@@ -471,11 +473,10 @@ public class Release_task implements Serializable {
     }
 
 
-
     //以下为福利相关方法
 
 
-//      `boon_content` varchar(255) NOT NULL DEFAULT '' COMMENT '福利内容',
+    //      `boon_content` varchar(255) NOT NULL DEFAULT '' COMMENT '福利内容',
     private String boon_content;
 
     public void setBoon_content(String boon_content) {
@@ -486,15 +487,51 @@ public class Release_task implements Serializable {
         return boon_content;
     }
 
+//`difficulty` int(11) DEFAULT '1' COMMENT '难度 从小到大 难度增大 1:青铜、2:白银、3:黄金、4:铂金、5:钻石、6:至尊、7:王者'
+
+    private int difficulty;
+
+    public void setDifficulty(int difficulty) {
+        this.difficulty = difficulty;
+    }
+
+    public int getDifficulty() {
+        return difficulty;
+    }
+//`vip` int(11) NOT NULL DEFAULT '0' COMMENT '0:全部可接  1:vip专属',
+    private int vip;
+
+    public void setVip(int vip) {
+        this.vip = vip;
+    }
+
+    public int getVip() {
+        return vip;
+    }
+
+
 
 
 
     //获取福利的展示内容
     public CharSequence getWelfareInfo() {
-        return String.format(Locale.CHINA, "内容:%s", boon_content);
+        return String.format(Locale.CHINA, "内容:%s", boon_content == null ? "" : boon_content);
     }
+
     //获取福利的价值
     public CharSequence getWelfareValue() {
         return new SpannableSb().append("价值:").append(String.format(Locale.CHINA, "¥%s", bonus), "#FD2D54").getSsb();
     }
+    //获取福利的价值
+    public CharSequence getRemainderTime() {
+        return new SpannableSb().append("剩余时间:").append(TimeUtil.getDurationText2(Long.valueOf(deadline) - System.currentTimeMillis() / 1000L)).getSsb();
+    }
+
+    //获取级别,其对应资源中的R.drawable.ic_welfare_level_1
+    public int getLevel() {
+        return Math.max(difficulty, 1);
+    }
+    public boolean isVipWelfare(){
+        return vip == 1;
+    }
 }

+ 58 - 1
app/src/main/java/com/sheep/gamegroup/module/game/activity/ActWelfareSpecialArea.java

@@ -1,7 +1,18 @@
 package com.sheep.gamegroup.module.game.activity;
 
+import android.app.Activity;
+import android.support.design.widget.TabLayout;
+import android.support.v4.view.ViewPager;
+
 import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.module.game.fragment.FgtAllWelfare;
+import com.sheep.gamegroup.module.game.fragment.FgtMyWelfare;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
+
+import butterknife.BindView;
 
 /**
  * Created by realicing on 2019/3/26.
@@ -9,13 +20,59 @@ import com.sheep.jiuyan.samllsheep.R;
  * 小绵羊3.5.3新增 -- 游戏福利专区 界面
  */
 public class ActWelfareSpecialArea extends BaseActivity {
+
+    @BindView(R.id.indicator)
+    TabLayout indicator;
+    @BindView(R.id.pager)
+    ViewPager pager;
     @Override
     protected int getLayoutId() {
-        return R.layout.item_hp_refresh_welfare;
+        return R.layout.common_tab_vp;
     }
 
+
     @Override
     public void initView() {
+        activity = this;
+        TitleBarUtils.getInstance()
+                .setShowOrHide(this, true)
+                .setTitle(this, "游戏福利专区")
+                .setTitleFinish(this);
 
     }
+
+    private Activity activity;
+
+
+    private TitleFragmentListAdapter mAdapter;
+    @Override
+    public void initListener() {
+        mAdapter = new TitleFragmentListAdapter(getSupportFragmentManager());
+        mAdapter.add(new FgtAllWelfare(), "全部福利");
+        mAdapter.add(new FgtMyWelfare(), "我的福利");
+        pager.setAdapter(mAdapter);
+        indicator.setupWithViewPager(pager);
+        pager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
+            @Override
+            public void onPageScrolled(int i, float v, int i1) {
+
+            }
+
+            @Override
+            public void onPageSelected(int i) {
+            }
+
+            @Override
+            public void onPageScrollStateChanged(int i) {
+
+            }
+        });
+        pager.setOffscreenPageLimit(3);
+        CommonUtil.getInstance().reflex(indicator, activity);
+    }
+
+
+    @Override
+    public void initData() {
+    }
 }

+ 54 - 0
app/src/main/java/com/sheep/gamegroup/module/game/adapter/AdpAllWelfare.java

@@ -0,0 +1,54 @@
+package com.sheep.gamegroup.module.game.adapter;
+
+import android.support.annotation.Nullable;
+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.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+
+import java.util.List;
+
+/**
+ * Created by realicing on 2019/3/26.
+ * realicing@sina.com
+ */
+public class AdpAllWelfare extends BaseQuickAdapter<Release_task, BaseViewHolder> {
+    public AdpAllWelfare(int layoutResId, @Nullable List<Release_task> data) {
+        super(layoutResId, data);
+    }
+
+    @Override
+    protected void convert(BaseViewHolder baseViewHolder, Release_task release_task) {
+        ImageView item_icon_iv = baseViewHolder.itemView.findViewById(R.id.item_icon_iv);
+        ImageView item_level_iv = baseViewHolder.itemView.findViewById(R.id.item_level_iv);
+        TextView item_name_tv = baseViewHolder.itemView.findViewById(R.id.item_name_tv);
+        TextView item_time_tv = baseViewHolder.itemView.findViewById(R.id.item_time_tv);
+        TextView item_info_tv = baseViewHolder.itemView.findViewById(R.id.item_info_tv);
+        TextView item_value_tv = baseViewHolder.itemView.findViewById(R.id.item_value_tv);
+        TextView item_btn_tv = baseViewHolder.itemView.findViewById(R.id.item_btn_tv);
+        TextView item_vip_tv = baseViewHolder.itemView.findViewById(R.id.item_vip_tv);
+
+        if(release_task == null){
+            return;
+        }
+        TaskEty taskEty = release_task.getTask();
+        if(taskEty == null){
+            return;
+        }
+        ViewUtil.setGameImage(item_icon_iv, taskEty.getIcon());
+        ViewUtil.setImageLevel(item_level_iv, release_task.getLevel());
+        ViewUtil.setText(item_name_tv, release_task.getName());
+        ViewUtil.setText(item_time_tv, release_task.getRemainderTime());
+        ViewUtil.setText(item_info_tv, release_task.getWelfareInfo());
+        ViewUtil.setText(item_value_tv, release_task.getWelfareValue());
+        ViewUtil.setVisibility(item_vip_tv, release_task.isVipWelfare());
+        ViewUtil.setOnClickListener(item_btn_tv, view -> {
+            //TODO 领取福利
+        });
+    }
+}

+ 25 - 0
app/src/main/java/com/sheep/gamegroup/module/game/adapter/AdpMyWelfare.java

@@ -0,0 +1,25 @@
+package com.sheep.gamegroup.module.game.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 com.sheep.gamegroup.model.entity.TaskAcceptedEty;
+
+import java.util.List;
+
+/**
+ * Created by realicing on 2019/3/26.
+ * realicing@sina.com
+ */
+public class AdpMyWelfare extends BaseQuickAdapter<TaskAcceptedEty, BaseViewHolder> {
+    public AdpMyWelfare(int layoutResId, @Nullable List<TaskAcceptedEty> data) {
+        super(layoutResId, data);
+    }
+
+    @Override
+    protected void convert(BaseViewHolder baseViewHolder, TaskAcceptedEty release_task) {
+
+    }
+}

+ 44 - 0
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtAllWelfare.java

@@ -0,0 +1,44 @@
+package com.sheep.gamegroup.module.game.fragment;
+
+import android.support.v7.widget.RecyclerView;
+
+import com.sheep.gamegroup.model.api.ApiService;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.DownloadWelfare;
+import com.sheep.gamegroup.model.entity.Release_task;
+import com.sheep.gamegroup.module.game.adapter.AdpAllWelfare;
+import com.sheep.gamegroup.view.adapter.DownloadWelfareAdapter;
+import com.sheep.gamegroup.view.fragment.BaseListFragment2;
+import com.sheep.jiuyan.samllsheep.R;
+
+import java.util.Locale;
+
+import io.reactivex.Observable;
+
+/**
+ * Created by realicing on 2019/3/26.
+ * realicing@sina.com
+ * 小绵羊3.5.3新增 -- 全部福利
+ */
+public class FgtAllWelfare extends BaseListFragment2<Release_task> {
+    @Override
+    protected RecyclerView.Adapter getAdapter() {
+        return new AdpAllWelfare(R.layout.item_hp_refresh_welfare, list);
+    }
+
+    @Override
+    protected String getKey(int page, int per_page) {
+        return String.format(Locale.CHINA, "app/game_consumption/my_voucher?page=%d&per_page=%d", page, per_page);
+    }
+
+    @Override
+    protected Observable<BaseMessage> getApi(ApiService apiService) {
+        return apiService.getMyWelfareList(page, per_page);
+    }
+
+    @Override
+    protected Class<Release_task> getTClass() {
+        return Release_task.class;
+    }
+
+}

+ 42 - 0
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtMyWelfare.java

@@ -0,0 +1,42 @@
+package com.sheep.gamegroup.module.game.fragment;
+
+import android.support.v7.widget.RecyclerView;
+
+import com.sheep.gamegroup.model.api.ApiService;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.TaskAcceptedEty;
+import com.sheep.gamegroup.module.game.adapter.AdpMyWelfare;
+import com.sheep.gamegroup.view.fragment.BaseListFragment2;
+import com.sheep.jiuyan.samllsheep.R;
+
+import java.util.Locale;
+
+import io.reactivex.Observable;
+
+/**
+ * Created by realicing on 2019/3/26.
+ * realicing@sina.com
+ * 小绵羊3.5.3新增 -- 我的福利
+ */
+public class FgtMyWelfare extends BaseListFragment2<TaskAcceptedEty> {
+    @Override
+    protected RecyclerView.Adapter getAdapter() {
+        return new AdpMyWelfare(R.layout.item_all_welfare, list);
+    }
+
+    @Override
+    protected String getKey(int page, int per_page) {
+        return String.format(Locale.CHINA, "app/game_consumption/my_voucher?page=%d&per_page=%d", page, per_page);
+    }
+
+    @Override
+    protected Observable<BaseMessage> getApi(ApiService apiService) {
+        return apiService.getMyWelfareList(page, per_page);
+    }
+
+    @Override
+    protected Class<TaskAcceptedEty> getTClass() {
+        return TaskAcceptedEty.class;
+    }
+
+}

+ 14 - 0
app/src/main/java/com/sheep/gamegroup/util/TimeUtil.java

@@ -249,6 +249,20 @@ public class TimeUtil {
         else
             return "00:01";
     }
+    public static String getDurationText2(long duration) {
+        String result;
+         if(duration > 24 * 60 * 60)
+            result = String.format(Locale.CHINA, "%d天%d小时%d分钟", duration / 24 / 60 / 60,duration  / 24 / 60 % 60, duration / 60 % 60);
+        else if(duration > 60 * 60)
+            result = String.format(Locale.CHINA, "%d小时%d分钟", duration / 60 / 60, duration / 60 % 60);
+        else if(duration > 60)
+            result = String.format(Locale.CHINA, "%d分钟", duration / 60);
+        else if(duration > 0)
+            result = "不足1分钟";
+        else
+            result = "已经过期";
+        return result.replace("0小时", "").replace("0分钟", "");
+    }
 
     /**
      * 是否大于今天

+ 7 - 0
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -362,6 +362,13 @@ public class ViewUtil {
         return view;
     }
 
+    public static void setImageLevel(ImageView imageView, int level) {
+        if(imageView != null){
+            imageView.setImageLevel(level);
+        }
+
+    }
+
     /**
      * 主页抢任务,更换任务时,获取新的任务
      *

binární
app/src/main/res/drawable-xxhdpi/ic_welfare_level_1.png


binární
app/src/main/res/drawable-xxhdpi/ic_welfare_level_2.png


binární
app/src/main/res/drawable-xxhdpi/ic_welfare_level_3.png


binární
app/src/main/res/drawable-xxhdpi/ic_welfare_level_4.png


binární
app/src/main/res/drawable-xxhdpi/ic_welfare_level_5.png


binární
app/src/main/res/drawable-xxhdpi/ic_welfare_level_7.png


+ 11 - 0
app/src/main/res/drawable/level_list_welfare.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<level-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:maxLevel="0" android:drawable="@drawable/ic_welfare_level_1" />
+    <item android:maxLevel="1" android:drawable="@drawable/ic_welfare_level_1" />
+    <item android:maxLevel="2" android:drawable="@drawable/ic_welfare_level_2" />
+    <item android:maxLevel="3" android:drawable="@drawable/ic_welfare_level_3" />
+    <item android:maxLevel="4" android:drawable="@drawable/ic_welfare_level_4" />
+    <item android:maxLevel="5" android:drawable="@drawable/ic_welfare_level_5" />
+    <item android:maxLevel="6" android:drawable="@drawable/ic_welfare_level_6" />
+    <item android:maxLevel="7" android:drawable="@drawable/ic_welfare_level_7" />
+</level-list>

+ 1 - 1
app/src/main/res/drawable/shape_main_search_bar_radius.xml

@@ -2,5 +2,5 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
     android:shape="rectangle">
     <corners android:radius="15dp" />
-    <solid android:color="#33F7F7F7" />
+    <solid android:color="#F7F7F7" />
 </shape>

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

@@ -2,7 +2,7 @@
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:background="@color/bg_home_color">
+    android:background="@color/bg">
 
     <View
         android:id="@+id/home_search_top"

+ 114 - 0
app/src/main/res/layout/item_all_welfare.xml

@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <ImageView
+        android:id="@+id/item_icon_iv"
+        android:layout_width="89dp"
+        android:layout_height="89dp"
+        android:layout_marginStart="15dp"
+        android:layout_marginTop="11dp"
+        android:layout_marginBottom="19dp"
+        android:src="@mipmap/sheep_logo"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+
+    <ImageView
+        android:id="@+id/item_level_iv"
+        android:layout_width="54dp"
+        android:layout_height="wrap_content"
+        android:adjustViewBounds="true"
+        android:scaleType="fitXY"
+        android:src="@drawable/ic_welfare_level_1"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <ImageView
+        android:id="@+id/item_song_iv"
+        android:layout_width="21dp"
+        android:layout_height="21dp"
+        android:layout_marginStart="12dp"
+        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/item_time_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="13dp"
+        android:text="剩余时间:3天54小时12分"
+        android:textColor="#ff999999"
+        android:textSize="11sp"
+        app:layout_constraintBottom_toTopOf="@id/item_info_tv"
+        app:layout_constraintStart_toStartOf="@id/item_song_iv" />
+
+    <TextView
+        android:id="@+id/item_info_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="内容:xx皮肤、xx皮肤"
+        android:textColor="#ff999999"
+        android:textSize="11sp"
+        app:layout_constraintBottom_toBottomOf="@id/item_icon_iv"
+        app:layout_constraintStart_toStartOf="@id/item_song_iv" />
+
+    <TextView
+        android:id="@+id/item_value_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="21dp"
+        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" />
+
+    <TextView
+        android:id="@+id/item_btn_tv"
+        style="@style/style_button_find"
+        android:layout_marginEnd="17dp"
+        android:text="领取福利"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/item_vip_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="8dp"
+        android:text="VIP专属"
+        android:textColor="#ffc3995e"
+        android:textSize="12sp"
+        app:layout_constraintEnd_toEndOf="@id/item_btn_tv"
+        app:layout_constraintStart_toStartOf="@id/item_btn_tv"
+        app:layout_constraintTop_toBottomOf="@id/item_btn_tv" />
+
+    <View
+        android:layout_width="0dp"
+        android:layout_height="1dp"
+        android:layout_marginStart="16dp"
+        android:layout_marginEnd="16dp"
+        android:background="#F2F2F2"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent" />
+</android.support.constraint.ConstraintLayout>