Преглед на файлове

添加游戏中心与福利中心界面

zengjiebin преди 7 години
родител
ревизия
7c61d08fc7

+ 2 - 3
app/src/main/AndroidManifest.xml

@@ -355,9 +355,6 @@
         <activity
             android:name="com.sheep.gamegroup.view.activity.FeedbackAct"
             android:screenOrientation="portrait" />
-        <activity
-            android:name="com.sheep.gamegroup.view.activity.ActMainGame"
-            android:screenOrientation="portrait" />
 
 
         <activity
@@ -578,6 +575,8 @@
             android:screenOrientation="portrait"/>
         <activity android:name="com.sheep.gamegroup.view.activity.ActivityMessages"
             android:screenOrientation="portrait"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActGameCenter"
+            android:screenOrientation="portrait"/>
 
         <!--start幂动科技-->
 

+ 0 - 9
app/src/main/java/com/kfzs/duanduan/mine/GiftpackListAdapter.java

@@ -1,16 +1,9 @@
 package com.kfzs.duanduan.mine;
 
-import android.annotation.SuppressLint;
 import android.content.Context;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.FragmentManager;
 import android.support.v4.app.FragmentPagerAdapter;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.sheep.jiuyan.samllsheep.R;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -21,13 +14,11 @@ import java.util.List;
  */
 
 public class GiftpackListAdapter extends FragmentPagerAdapter {
-    private Context mContext;
     private List<Object> mListFragment = new ArrayList<>();
     private List<Object> mTitles = new ArrayList<>();
 
     public GiftpackListAdapter(FragmentManager fm, Context mContext) {
         super(fm);
-        this.mContext = mContext;
     }
 
     public void add(Fragment fragment, String title) {

+ 8 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/Welfare.java

@@ -0,0 +1,8 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/8/28.
+ * realicing@sina.com
+ */
+public class Welfare {
+}

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

@@ -39,11 +39,11 @@ import com.sheep.gamegroup.view.activity.ActFindGame;
 import com.sheep.gamegroup.view.activity.ActFindInformation;
 import com.sheep.gamegroup.view.activity.ActGameAccount;
 import com.sheep.gamegroup.view.activity.ActGameAgencyRecharge;
+import com.sheep.gamegroup.view.activity.ActGameCenter;
 import com.sheep.gamegroup.view.activity.ActGuide;
 import com.sheep.gamegroup.view.activity.ActGuideDeblocked;
 import com.sheep.gamegroup.view.activity.ActGuideOnHook;
 import com.sheep.gamegroup.view.activity.ActLoadH5;
-import com.sheep.gamegroup.view.activity.ActMainGame;
 import com.sheep.gamegroup.view.activity.ActMiDong;
 import com.sheep.gamegroup.view.activity.ActMyMoney;
 import com.sheep.gamegroup.view.activity.ActNewAboutUs;
@@ -886,7 +886,7 @@ public class Jump2View {
      * @param context
      */
     public void goMainGame(Context context) {
-        Intent intent = new Intent(context, ActMainGame.class);
+        Intent intent = new Intent(context, ActGameCenter.class);
         context.startActivity(intent);
     }
 

+ 50 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/ActGameCenter.java

@@ -0,0 +1,50 @@
+package com.sheep.gamegroup.view.activity;
+
+import android.support.v4.view.ViewPager;
+import android.support.v4.widget.SwipeRefreshLayout;
+import android.view.View;
+
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.view.fragment.FgtWelfareCenter;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
+
+import butterknife.BindView;
+
+/**
+ * Created by realicing on 2018/8/29.
+ * realicing@sina.com
+ */
+public class ActGameCenter extends BaseActivity {
+    @BindView(R.id.act_game_center_vp)
+    ViewPager act_game_center_vp;
+    @Override
+    protected int getLayoutId() {
+        return R.layout.act_game_center;
+    }
+    private ActGameCenter activity;
+    @Override
+    public void initView() {
+        activity = this;
+        TitleBarUtils.getInstance()
+                .setTitleFinish(activity)
+                .setRightBotton(activity, "我的福利", 0, new View.OnClickListener() {
+                    @Override
+                    public void onClick(View v) {
+                        //TODO 进入我的福利界面
+                    }
+                })
+                .addTabs(activity, act_game_center_vp,"玩转游戏", new FgtWelfareCenter(), "福利中心", new FgtWelfareCenter());
+
+    }
+
+    @Override
+    public void initListener() {
+
+    }
+
+    @Override
+    public void initData() {
+
+    }
+}

+ 32 - 0
app/src/main/java/com/sheep/gamegroup/view/adapter/DownloadWelfareAdapter.java

@@ -0,0 +1,32 @@
+package com.sheep.gamegroup.view.adapter;
+
+import android.content.Context;
+import android.view.View;
+
+import com.sheep.gamegroup.model.entity.Welfare;
+import com.sheep.gamegroup.util.ViewHolder;
+import com.sheep.jiuyan.samllsheep.R;
+
+import java.util.List;
+
+/**
+ * Created by realicing on 2018/8/28.
+ * realicing@sina.com
+ */
+public class DownloadWelfareAdapter extends AdbCommonRecycler<Welfare> {
+
+    public DownloadWelfareAdapter(Context context, List<Welfare> list) {
+        super(context, list);
+    }
+
+    @Override
+    public int getViewIdByType(int type) {
+        return R.layout.item_download_welfare;
+    }
+
+    @Override
+    public void convert(ViewHolder holder, Welfare welfareCenter) {
+        View item_download_welfare_line = holder.getView(R.id.item_download_welfare_line);
+        item_download_welfare_line.setVisibility(holder.getAdapterPosition() + 1 == getItemCount() ? View.GONE : View.VISIBLE);
+    }
+}

+ 30 - 0
app/src/main/java/com/sheep/gamegroup/view/adapter/GiftCenterAdapter.java

@@ -0,0 +1,30 @@
+package com.sheep.gamegroup.view.adapter;
+
+import android.content.Context;
+
+import com.sheep.gamegroup.model.entity.Welfare;
+import com.sheep.gamegroup.util.ViewHolder;
+import com.sheep.jiuyan.samllsheep.R;
+
+import java.util.List;
+
+/**
+ * Created by realicing on 2018/8/28.
+ * realicing@sina.com
+ */
+public class GiftCenterAdapter extends AdbCommonRecycler<Welfare> {
+
+    public GiftCenterAdapter(Context context, List<Welfare> list) {
+        super(context, list);
+    }
+
+    @Override
+    public int getViewIdByType(int type) {
+        return R.layout.item_download_welfare;
+    }
+
+    @Override
+    public void convert(ViewHolder holder, Welfare welfareCenter) {
+
+    }
+}

+ 236 - 0
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtWelfareCenter.java

@@ -0,0 +1,236 @@
+package com.sheep.gamegroup.view.fragment;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.support.v4.widget.SwipeRefreshLayout;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.Welfare;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.ViewHolder;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.AdbCommonRecycler;
+import com.sheep.gamegroup.view.adapter.DownloadWelfareAdapter;
+import com.sheep.gamegroup.view.adapter.GiftCenterAdapter;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.base.BaseFragment;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import butterknife.Unbinder;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.schedulers.Schedulers;
+
+/**
+ * Created by realicing on 2018/8/28.
+ * realicing@sina.com
+ */
+public class FgtWelfareCenter extends BaseFragment {
+    @BindView(R.id.refresh)
+    SwipeRefreshLayout refresh;
+    @BindView(R.id.wc_hot_welfare_list)
+    RecyclerView wcHotWelfareList;
+    @BindView(R.id.wc_all_welfare)
+    TextView wcAllWelfare;
+    @BindView(R.id.wc_download_welfare_list)
+    RecyclerView wcDownloadWelfareList;
+    @BindView(R.id.wc_all_gift)
+    TextView wcAllGift;
+    @BindView(R.id.wc_gift_center_list)
+    RecyclerView wcGiftCenterList;
+    @BindView(R.id.bottom_line_text)
+    TextView bottomLineText;
+    @BindView(R.id.bottom_line)
+    LinearLayout bottomLine;
+    Unbinder unbinder;
+
+    @Override
+    public int getLayoutId() {
+        return R.layout.fgt_welfare_center;
+    }
+    private List<Welfare> hotWelfareList = ListUtil.emptyList();
+    private List<Welfare> downloadWelfareList = ListUtil.emptyList();
+    private List<Welfare> giftCenterList = ListUtil.emptyList();
+    @Override
+    public void onViewCreated() {
+        Context context = SheepApp.getInstance();
+        //热门福利
+        LinearLayoutManager hotLayoutManager = new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false);
+        wcHotWelfareList.setHasFixedSize(true);
+        wcHotWelfareList.setNestedScrollingEnabled(false);
+        wcHotWelfareList.setLayoutManager(hotLayoutManager);
+        wcHotWelfareList.setAdapter(new AdbCommonRecycler<Welfare>(context, hotWelfareList) {
+            @Override
+            public int getViewIdByType(int type) {
+                return R.layout.item_hot_welfare;
+            }
+
+            @Override
+            public void convert(ViewHolder holder, Welfare welfareCenter) {
+//                ImageView item_hot_welfare_iv = holder.getView(R.id.item_hot_welfare_iv);
+//                TextView item_hot_welfare_tv = holder.getView(R.id.item_hot_welfare_tv);
+//                if(welfareCenter == null){
+//                    ViewUtil.setDefaultText(item_hot_welfare_tv);
+//                } else {
+//                    //TODO 加载数据
+//                    ViewUtil.setText(item_hot_welfare_tv);
+//                }
+            }
+        });
+        //下载福利
+        LinearLayoutManager downloadLayoutManager = new LinearLayoutManager(context);
+        wcDownloadWelfareList.setHasFixedSize(true);
+        wcDownloadWelfareList.setNestedScrollingEnabled(false);
+        wcDownloadWelfareList.setLayoutManager(downloadLayoutManager);
+        wcDownloadWelfareList.setAdapter(new DownloadWelfareAdapter(context, downloadWelfareList));
+        //礼包中心
+        LinearLayoutManager layoutManager = new LinearLayoutManager(context);
+        wcGiftCenterList.setHasFixedSize(true);
+        wcGiftCenterList.setNestedScrollingEnabled(false);
+        wcGiftCenterList.setLayoutManager(layoutManager);
+        wcGiftCenterList.setAdapter(new GiftCenterAdapter(context, giftCenterList));
+        refresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
+            @Override
+            public void onRefresh() {
+                refreshHotWelfare = true;
+                refreshDownloadWelfare = true;
+                refreshGiftCenter = true;
+                refreshData();
+            }
+        });
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        refreshData();
+    }
+    private boolean refreshHotWelfare = true;
+    private boolean refreshDownloadWelfare = true;
+    private boolean refreshGiftCenter = true;
+    //刷新数据
+    private void refreshData() {
+        if(refreshHotWelfare || refreshDownloadWelfare || refreshGiftCenter) {
+            refresh.setRefreshing(true);
+        }
+        //热门福利
+        if(refreshHotWelfare) {
+            SheepApp.getInstance().getNetComponent().getApiService().getFindTagList()
+                    .subscribeOn(Schedulers.io())
+                    .observeOn(AndroidSchedulers.mainThread())
+                    .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                        @Override
+                        public void onNext(BaseMessage baseMessage) {
+                            refreshHotWelfare = false;
+                            ArrayList<Welfare> newList = baseMessage.getDataList(Welfare.class);
+                            hotWelfareList.clear();
+                            ListUtil.addAll(hotWelfareList, newList);
+                            wcHotWelfareList.getAdapter().notifyDataSetChanged();
+                            notifyDataSetChanged();
+                        }
+
+                        @Override
+                        public void onError(BaseMessage baseMessage) {
+                            refreshHotWelfare = false;
+                            hotWelfareList.clear();
+                            wcHotWelfareList.getAdapter().notifyDataSetChanged();
+                            notifyDataSetChanged();
+                        }
+                    });
+        }
+        //下载福利
+        if(refreshDownloadWelfare) {
+            SheepApp.getInstance().getNetComponent().getApiService().getFindTagList()
+                    .subscribeOn(Schedulers.io())
+                    .observeOn(AndroidSchedulers.mainThread())
+                    .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                        @Override
+                        public void onNext(BaseMessage baseMessage) {
+                            refreshDownloadWelfare = false;
+                            ArrayList<Welfare> newList = baseMessage.getDataList(Welfare.class);
+                            downloadWelfareList.clear();
+                            ListUtil.addAll(downloadWelfareList, newList);
+                            wcDownloadWelfareList.getAdapter().notifyDataSetChanged();
+                            notifyDataSetChanged();
+                        }
+
+                        @Override
+                        public void onError(BaseMessage baseMessage) {
+                            refreshDownloadWelfare = false;
+                            downloadWelfareList.clear();
+                            wcDownloadWelfareList.getAdapter().notifyDataSetChanged();
+                            notifyDataSetChanged();
+                        }
+                    });
+        }
+        //礼包中心
+        if(refreshGiftCenter) {
+            SheepApp.getInstance().getNetComponent().getApiService().getFindTagList()
+                    .subscribeOn(Schedulers.io())
+                    .observeOn(AndroidSchedulers.mainThread())
+                    .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                        @Override
+                        public void onNext(BaseMessage baseMessage) {
+                            refreshGiftCenter = false;
+                            ArrayList<Welfare> newList = baseMessage.getDataList(Welfare.class);
+                            giftCenterList.clear();
+                            ListUtil.addAll(giftCenterList, newList);
+                            wcGiftCenterList.getAdapter().notifyDataSetChanged();
+                            notifyDataSetChanged();
+                        }
+
+                        @Override
+                        public void onError(BaseMessage baseMessage) {
+                            refreshGiftCenter = false;
+                            giftCenterList.clear();
+                            wcGiftCenterList.getAdapter().notifyDataSetChanged();
+                            notifyDataSetChanged();
+                        }
+                    });
+        }
+    }
+
+    private void notifyDataSetChanged() {
+        if(!refreshHotWelfare && !refreshDownloadWelfare && !refreshGiftCenter)
+            refresh.setRefreshing(false);
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+        // TODO: inflate a fragment view
+        View rootView = super.onCreateView(inflater, container, savedInstanceState);
+        unbinder = ButterKnife.bind(this, rootView);
+        return rootView;
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        unbinder.unbind();
+    }
+
+    @OnClick({R.id.wc_all_welfare, R.id.wc_all_gift})
+    public void onViewClicked(View view) {
+        switch (view.getId()) {
+            case R.id.wc_all_welfare://全部福利
+                break;
+            case R.id.wc_all_gift://全部礼包
+                break;
+        }
+    }
+}

+ 33 - 2
app/src/main/java/com/sheep/jiuyan/samllsheep/utils/TitleBarUtils.java

@@ -3,12 +3,21 @@ package com.sheep.jiuyan.samllsheep.utils;
 import android.app.Activity;
 import android.graphics.drawable.ColorDrawable;
 import android.support.annotation.DrawableRes;
+import android.support.design.widget.TabLayout;
+import android.support.v4.app.Fragment;
+import android.support.v4.view.ViewPager;
 import android.view.View;
 import android.widget.Button;
 import android.widget.ImageButton;
 import android.widget.ImageView;
 import android.widget.TextView;
 
+import com.kfzs.duanduan.mine.GiftpackListAdapter;
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.view.adapter.AdpTryMakemoney;
+import com.sheep.gamegroup.view.fragment.FgtTryMakeMoney;
+import com.sheep.gamegroup.view.fragment.FgtWelfareCenter;
 import com.sheep.jiuyan.samllsheep.R;
 
 
@@ -185,7 +194,7 @@ public class TitleBarUtils {
      * @param backgroundColorResId 设置背景,0为透明,-1不变,-2为Gone,其它为ResID
      * @param onClickListener      点击时的操作。
      */
-    public void setRightBotton(Activity activity, String btnText, int backgroundColorResId,
+    public TitleBarUtils setRightBotton(Activity activity, String btnText, int backgroundColorResId,
                                View.OnClickListener onClickListener) {
         Button button = activity.findViewById(R.id.btn_baseactivity_right);
         ImageButton imageButton = activity.findViewById(R.id.ibtn_baseactivity_right);
@@ -195,7 +204,7 @@ public class TitleBarUtils {
             button.setBackgroundColor(0x00000000);
         } else if (backgroundColorResId == -2) {
             button.setVisibility(View.GONE);
-            return;
+            return this;
         } else if (backgroundColorResId != -1) {
             button.setBackgroundColor(backgroundColorResId);
         }
@@ -207,6 +216,7 @@ public class TitleBarUtils {
         if (onClickListener != null) {
             button.setOnClickListener(onClickListener);
         }
+        return this;
     }
 
 
@@ -369,4 +379,25 @@ public class TitleBarUtils {
         secondImageButton.setOnClickListener(secondOnclick);
         return this;
     }
+
+    public TitleBarUtils addTabs(BaseActivity activity, ViewPager viewPager, String tab1, Fragment fragment1, String tab2, Fragment fragment2) {
+        //设置标题不可见
+        TextView titleView = activity.findViewById(R.id.txt_baseactivity_title);
+        titleView.setVisibility(View.GONE);
+        //设置tab可见
+        TabLayout tabLayout = activity.findViewById(R.id.title_tab);
+        tabLayout.setVisibility(View.VISIBLE);
+
+        GiftpackListAdapter adapter = new GiftpackListAdapter(activity.getSupportFragmentManager(), activity);
+        adapter.add(fragment1, tab1);
+        adapter.add(fragment2, tab2);
+
+        viewPager.setOffscreenPageLimit(2);
+        viewPager.setAdapter(adapter);
+
+        tabLayout.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(viewPager));
+        tabLayout.setupWithViewPager(viewPager);
+//        CommonUtil.getInstance().reflex(tabLayout, activity);
+        return this;
+    }
 }

+ 16 - 0
app/src/main/res/layout/act_game_center.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    tools:context="com.sheep.gamegroup.view.activity.ActGameCenter">
+
+    <include layout="@layout/title" />
+
+    <android.support.v4.view.ViewPager
+        android:id="@+id/act_game_center_vp"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+
+</LinearLayout>

+ 78 - 0
app/src/main/res/layout/fgt_welfare_center.xml

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/refresh"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/white">
+
+    <android.support.v4.widget.NestedScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="vertical">
+
+            <RelativeLayout style="@style/style_wc_rl">
+
+                <TextView
+                    style="@style/style_wc_line_title"
+                    android:text="热门福利" />
+            </RelativeLayout>
+
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/wc_hot_welfare_list"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content" />
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="10dp"
+                android:background="#fff5f5f5" />
+
+            <RelativeLayout style="@style/style_wc_rl">
+
+                <TextView
+                    style="@style/style_wc_line_title"
+                    android:text="下载福利" />
+
+                <TextView
+                    android:id="@+id/wc_all_welfare"
+                    style="@style/style_wc_more"
+                    android:text="全部福利" />
+            </RelativeLayout>
+
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/wc_download_welfare_list"
+                android:layout_width="match_parent"
+                android:paddingTop="4dp"
+                android:paddingBottom="4dp"
+                android:layout_height="wrap_content" />
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="10dp"
+                android:background="#fff5f5f5" />
+
+            <RelativeLayout style="@style/style_wc_rl">
+
+                <TextView
+                    style="@style/style_wc_line_title"
+                    android:text="礼包中心" />
+
+                <TextView
+                    android:id="@+id/wc_all_gift"
+                    style="@style/style_wc_more"
+                    android:text="全部礼包" />
+            </RelativeLayout>
+
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/wc_gift_center_list"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content" />
+
+            <include layout="@layout/find_item_bottom" />
+        </LinearLayout>
+    </android.support.v4.widget.NestedScrollView>
+</android.support.v4.widget.SwipeRefreshLayout>

+ 141 - 0
app/src/main/res/layout/item_download_welfare.xml

@@ -0,0 +1,141 @@
+<?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="wrap_content"
+    android:orientation="vertical">
+
+    <android.support.constraint.ConstraintLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="16dp"
+        android:layout_marginStart="16dp"
+        android:layout_marginTop="16dp">
+
+        <ImageView
+            android:id="@+id/item_download_welfare_iv"
+            android:layout_width="62dp"
+            android:layout_height="62dp"
+            android:src="@drawable/icon_lj"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="62dp"
+            android:layout_marginStart="@dimen/content_padding"
+            android:orientation="vertical"
+            app:layout_constraintEnd_toStartOf="@+id/item_download_welfare_btn_top"
+            app:layout_constraintStart_toEndOf="@+id/item_download_welfare_iv">
+
+            <TextView
+                android:id="@+id/item_download_welfare_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_download_welfare_num_tv"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="第充500送500"
+                    android:textColor="#cc8e8e8e"
+                    android:textSize="10sp" />
+
+                <TextView
+                    android:id="@+id/item_download_welfare_num_tv1"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/content_padding"
+                    android:text=""
+                    android:textColor="#cc8e8e8e"
+                    android:textSize="10sp" />
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="1" />
+
+            <TextView
+                android:id="@+id/item_download_welfare_date_tv"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginEnd="@dimen/content_padding_8"
+                android:layout_marginTop="@dimen/content_padding_2"
+                android:lines="1"
+                android:text="2018/08/20"
+                android:textColor="#8e8e8e"
+                android:textSize="10sp" />
+        </LinearLayout>
+
+
+        <TextView
+            android:id="@+id/item_download_welfare__money"
+            android:layout_width="@dimen/find_bt_with"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="5dp"
+            android:gravity="center"
+            android:text="+10元"
+            android:textColor="@color/txt_red"
+            android:textSize="15sp"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+        <TextView
+            android:id="@+id/item_download_welfare_btn_top"
+            style="@style/style_button_find"
+            android:layout_marginTop="5dp"
+            android:text="取消任务"
+            android:visibility="invisible"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <TextView
+            android:id="@+id/item_download_welfare_btn_center"
+            style="@style/style_button_find"
+            android:layout_centerInParent="true"
+            android:text="取消任务"
+            android:visibility="gone"
+            app:layout_constraintBottom_toBottomOf="@+id/item_download_welfare_iv"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <TextView
+            android:id="@+id/item_download_welfare_btn_bottom"
+            style="@style/style_button_find"
+            android:text="取消任务"
+            android:layout_marginBottom="5dp"
+            app:layout_constraintBottom_toBottomOf="@+id/item_download_welfare_iv"
+            app:layout_constraintEnd_toEndOf="parent" />
+    </android.support.constraint.ConstraintLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="16dp" />
+
+    <View
+        android:id="@+id/item_download_welfare_line"
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_marginEnd="16dp"
+        android:layout_marginStart="16dp"
+        android:background="@color/gray_F2F2F2" />
+</LinearLayout>

+ 30 - 0
app/src/main/res/layout/item_hot_welfare.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:layout_gravity="center"
+    android:paddingStart="16dp"
+    android:paddingEnd="6dp"
+    android:paddingTop="20dp"
+    android:paddingBottom="20dp"
+    android:orientation="vertical">
+
+    <ImageView
+        android:id="@+id/item_hot_welfare_iv"
+        android:layout_width="62dp"
+        android:layout_height="62dp"
+        android:layout_gravity="center"
+        android:src="@drawable/icon_lj"/>
+
+    <TextView
+        android:id="@+id/item_hot_welfare_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_horizontal"
+        android:layout_marginTop="12dp"
+        android:ellipsize="end"
+        android:textColor="#333333"
+        android:textSize="12sp"
+        android:lines="1"
+        android:text="1234"/>
+</LinearLayout>

+ 14 - 5
app/src/main/res/layout/title.xml

@@ -15,6 +15,14 @@
         android:scaleType="centerInside"
         android:src="@drawable/narrow_back_black"/>
 
+    <android.support.design.widget.TabLayout
+        android:id="@+id/title_tab"
+        style="@style/style_tab"
+        android:layout_width="wrap_content"
+        android:layout_centerInParent="true"
+        android:minWidth="100dp"
+        android:visibility="gone"
+        />
     <TextView
         android:id="@+id/txt_baseactivity_title"
         android:layout_width="wrap_content"
@@ -33,23 +41,24 @@
 
     <RelativeLayout
         android:id="@+id/btn_baseactivity_right_layout"
-        android:layout_width="@dimen/app_nav_toolbar_height"
+        android:layout_width="wrap_content"
         android:layout_height="@dimen/app_nav_toolbar_height"
-        android:layout_alignParentRight="true"
+        android:layout_alignParentEnd="true"
         android:layout_centerInParent="true"
         android:visibility="visible">
 
         <Button
             android:id="@+id/btn_baseactivity_right"
             style="?android:attr/borderlessButtonStyle"
-            android:layout_width="@dimen/app_nav_toolbar_height"
+            android:layout_width="wrap_content"
             android:layout_height="@dimen/app_nav_toolbar_height"
-            android:layout_marginRight="5dp"
+            android:layout_marginEnd="17dp"
             android:background="@color/translate"
             android:gravity="center"
+            android:lines="1"
             android:minWidth="?attr/actionBarSize"
             android:textColor="@color/black_text_deep"
-            android:textSize="@dimen/text_size_3"
+            android:textSize="12sp"
             android:layout_alignParentTop="true"
             android:layout_alignParentEnd="true" />
 

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

@@ -450,4 +450,34 @@
         <item name="android:textColorHint">#A0D3F6</item>
         <item name="android:textSize">15sp</item>
     </style>
+    <!--福利中心中带线标题与点击查看更多的容器-->
+    <style name="style_wc_rl">
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:layout_marginEnd">15dp</item>
+        <item name="android:layout_marginStart">15dp</item>
+        <item name="android:layout_marginTop">18dp</item>
+    </style>
+    <!--福利中心中带线标题-->
+    <style name="style_wc_line_title">
+        <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:drawablePadding">@dimen/content_padding_default</item>
+        <item name="android:drawableStart">?line_short</item>
+        <item name="android:gravity">center_vertical</item>
+        <item name="android:textColor">#2c2c2c</item>
+        <item name="android:textSize">15sp</item>
+    </style>
+    <!--福利中心中点击查看更多-->
+    <style name="style_wc_more">
+        <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:layout_alignParentEnd">true</item>
+        <item name="android:layout_centerVertical">true</item>
+        <item name="android:drawableEnd">@mipmap/x_ic_next</item>
+        <item name="android:drawablePadding">7dp</item>
+        <item name="android:gravity">end</item>
+        <item name="android:textColor">#666666</item>
+        <item name="android:textSize">12sp</item>
+    </style>
 </resources>