Ver código fonte

主页面优化完成60%

zengjiebin 7 anos atrás
pai
commit
a7c8c3ac70
21 arquivos alterados com 559 adições e 681 exclusões
  1. 4 0
      app/src/main/AndroidManifest.xml
  2. 5 0
      app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java
  3. 35 0
      app/src/main/java/com/sheep/gamegroup/model/entity/CommendTask.java
  4. 0 634
      app/src/main/java/com/sheep/gamegroup/model/entity/RobTask.java
  5. 21 0
      app/src/main/java/com/sheep/gamegroup/module/game/activity/ActWelfareSpecialArea.java
  6. 24 0
      app/src/main/java/com/sheep/gamegroup/module/home/adapter/AdpRefreshWelfare.java
  7. 27 3
      app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java
  8. 2 0
      app/src/main/java/com/sheep/gamegroup/util/DataKey.java
  9. 12 0
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  10. 1 0
      app/src/main/java/com/sheep/gamegroup/util/UMConfigUtils.java
  11. 7 8
      app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java
  12. 3 4
      app/src/main/java/com/sheep/gamegroup/view/dialog/DialogGameOrTaskOrGift.java
  13. 33 6
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtSmallSheep.java
  14. 4 4
      app/src/main/java/com/sheep/jiuyan/samllsheep/ui/activity/SignActivity.java
  15. 1 0
      app/src/main/res/drawable/shape_bg_null.xml
  16. 6 0
      app/src/main/res/drawable/shape_solid_ffcad7_radius_4.xml
  17. 36 12
      app/src/main/res/layout/homepage_act_layout.xml
  18. 13 10
      app/src/main/res/layout/homepage_item_notice_and_currenttime.xml
  19. 51 0
      app/src/main/res/layout/hp_game_welfare_entrance.xml
  20. 274 0
      app/src/main/res/layout/item_hp_refresh_welfare.xml
  21. BIN
      app/src/main/res/mipmap-xxhdpi/xiaojiant.png

+ 4 - 0
app/src/main/AndroidManifest.xml

@@ -982,6 +982,10 @@
             android:name="com.sheep.gamegroup.module.find.activity.ActFind"
             android:screenOrientation="portrait"
             android:theme="@style/AppActionTheme" />
+        <activity
+            android:name="com.sheep.gamegroup.module.game.activity.ActWelfareSpecialArea"
+            android:screenOrientation="portrait"
+            android:theme="@style/AppActionTheme" />
 
         <provider
             android:name=".provider.TokenRenewalProvider"

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

@@ -126,6 +126,11 @@ public interface ApiService {
      */
     @GET("app/release_task/commend_task/")
     Observable<BaseMessage> getNewTask(@Query("order") int order);
+    /**
+     * 主页刷新福利
+     */
+    @GET("app/release_task/commend_task/")
+    Observable<BaseMessage> getNewTask(@Query("order") int order, @Query("task_type") int task_type);
 
     /**
      * 获取用户信息

Diferenças do arquivo suprimidas por serem muito extensas
+ 35 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/CommendTask.java


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 634
app/src/main/java/com/sheep/gamegroup/model/entity/RobTask.java


+ 21 - 0
app/src/main/java/com/sheep/gamegroup/module/game/activity/ActWelfareSpecialArea.java

@@ -0,0 +1,21 @@
+package com.sheep.gamegroup.module.game.activity;
+
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.jiuyan.samllsheep.R;
+
+/**
+ * Created by realicing on 2019/3/26.
+ * realicing@sina.com
+ * 小绵羊3.5.3新增 -- 游戏福利专区 界面
+ */
+public class ActWelfareSpecialArea extends BaseActivity {
+    @Override
+    protected int getLayoutId() {
+        return R.layout.item_hp_refresh_welfare;
+    }
+
+    @Override
+    public void initView() {
+
+    }
+}

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

@@ -0,0 +1,24 @@
+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) {
+
+    }
+}

+ 27 - 3
app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java

@@ -50,7 +50,7 @@ import com.sheep.gamegroup.model.entity.GameListTag;
 import com.sheep.gamegroup.model.entity.GiftBagApp;
 import com.sheep.gamegroup.model.entity.HomeListEntity;
 import com.sheep.gamegroup.model.entity.Release_task;
-import com.sheep.gamegroup.model.entity.RobTask;
+import com.sheep.gamegroup.model.entity.CommendTask;
 import com.sheep.gamegroup.model.entity.RouserArticlesEntity;
 import com.sheep.gamegroup.model.entity.SlideshowEty;
 import com.sheep.gamegroup.model.entity.TaskAcceptedEty;
@@ -2504,7 +2504,7 @@ public class CommonUtil {
     /**
      * 抢任务
      */
-    public void robTask(final Action1<RobTask> action1) {
+    public void robTask(final Action1<CommendTask> action1) {
         SheepApp.getInstance().getNetComponent().getApiService().getNewTask(DataUtil.getAsInt(DataKey.KEY_ORDER, 1))
                 .subscribeOn(Schedulers.io())
                 .observeOn(AndroidSchedulers.mainThread())
@@ -2512,7 +2512,31 @@ public class CommonUtil {
                     @Override
                     public void onNext(BaseMessage baseMessage) {
                         if (action1 != null) {
-                            RobTask mRobTask = baseMessage.getData(RobTask.class);
+                            CommendTask mRobTask = baseMessage.getData(CommendTask.class);
+                            action1.call(mRobTask);
+                        }
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        if (action1 != null) {
+                            action1.call(null);
+                        }
+                    }
+                });
+    }
+    /**
+     * 刷新福利
+     */
+    public void refreshWelfare(final Action1<CommendTask> action1) {
+        SheepApp.getInstance().getNetComponent().getApiService().getNewTask(DataUtil.getAsInt(DataKey.KEY_REFRESH_WELFARE_ORDER, 1), 1019)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        if (action1 != null) {
+                            CommendTask mRobTask = baseMessage.getData(CommendTask.class);
                             action1.call(mRobTask);
                         }
                     }

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

@@ -9,6 +9,8 @@ public class DataKey {
     public static final String KEY_INSTALL_APK_PACKAGE_NAME = "installApk_packageName";
     //抢任务时有个次序,从1开始
     public static final String KEY_ORDER = "snatch_a_task_order";
+    //刷新福利时有个次序,从1开始
+    public static final String KEY_REFRESH_WELFARE_ORDER = "refresh_welfare_order";
     //将要安装的应用的路径,在接收广播的地方进行监听
     public static final String KEY_WILL_INSTALL_APK_PATH = "will_install_apk_path";
     //将要安装的应用的包名,在接收广播的地方进行监听

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

@@ -60,6 +60,7 @@ import com.sheep.gamegroup.module.game.activity.ActGameGroupOrGameDetail;
 import com.sheep.gamegroup.module.game.activity.ActGameRank;
 import com.sheep.gamegroup.module.game.activity.ActMyGameList;
 import com.sheep.gamegroup.module.game.activity.ActSearchGameGroup;
+import com.sheep.gamegroup.module.game.activity.ActWelfareSpecialArea;
 import com.sheep.gamegroup.module.game.model.GameCenterType;
 import com.sheep.gamegroup.module.game.model.GameGroup;
 import com.sheep.gamegroup.module.game.model.SearchResp;
@@ -213,6 +214,7 @@ import static com.sheep.gamegroup.util.UMConfigUtils.Event.GAME_GROUP_SEARCH;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.GAME_INSTEAD_OF_RECHARGE;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.GAME_MY_WELFARE;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.GAME_PLAY_GAME_DETAIL;
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.GAME_WELFARE_SPECIAL_AREA;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.GIFT_DETAIL;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.MI_DONG_VIEW;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.RECHARGE;
@@ -2965,4 +2967,14 @@ public class Jump2View {
             EventBus.getDefault().post(new ShowRedDot(ShowRedDot.WHERE_PERSONAL_CENTER).setShow(false));
         }
     }
+
+    /**
+     * 小绵羊3.5.3新增 -- 游戏福利专区 界面
+     */
+    public void toActWelfareSpecialArea() {
+        GAME_WELFARE_SPECIAL_AREA.onEvent();
+        Activity activity = SheepApp.getInstance().getCurrentActivity();
+        Intent intent = new Intent(activity, ActWelfareSpecialArea.class);
+        activity.startActivity(intent);
+    }
 }

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/util/UMConfigUtils.java

@@ -195,6 +195,7 @@ public class UMConfigUtils {
         GAME_GROUP_GAME_DETAIL("游戏中心 -> 搜索游戏组 -> 游戏组详情 -> 游戏详情"),
         HTXD_AD("发现 -> 资讯 -> 点击第5项的鸿途信达广告", "需要传 title ,如:{\"title\": \"我是一个标题\" }"),
         GAME_BANNER_CLICK_HORIZONTAL("游戏轮播图", "游戏轮播图点击次数"),
+        GAME_WELFARE_SPECIAL_AREA("游戏福利专区", "尝试打开游戏福利专区的次数"),
         ;
         private String tag;
         private String info;

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

@@ -79,11 +79,10 @@ import com.sheep.gamegroup.model.entity.GameAccountEntity;
 import com.sheep.gamegroup.model.entity.GiftBagApp;
 import com.sheep.gamegroup.model.entity.Lp;
 import com.sheep.gamegroup.model.entity.PayEntity;
-import com.sheep.gamegroup.model.entity.RobTask;
+import com.sheep.gamegroup.model.entity.CommendTask;
 import com.sheep.gamegroup.model.entity.TaskEty;
 import com.sheep.gamegroup.model.entity.WebParams;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
-import com.sheep.gamegroup.module.game.activity.ActGameGroupOrGameDetail;
 import com.sheep.gamegroup.module.skin.util.SkinUtil;
 import com.sheep.gamegroup.module.yf_shop.model.ReceiveCouponsCheckResq;
 import com.sheep.gamegroup.module.yf_shop.model.ReceiveCouponsResp;
@@ -155,7 +154,7 @@ public class ViewUtil {
 
     public static final int REQUEST_CODE_TASK_LIST = 110;
     private static ViewUtil viewUtil;
-    private RobTask mRobTask;
+    private CommendTask mRobTask;
 
     public static ViewUtil newInstance() {
         if (viewUtil == null) {
@@ -361,12 +360,12 @@ public class ViewUtil {
      *
      * @return , TaskEty对象
      */
-    public RobTask getTask(final ImageView ivIcon, final TextView tvTitel, final TextView tvDutyMoney) {
+    public CommendTask getTask(final ImageView ivIcon, final TextView tvTitel, final TextView tvDutyMoney) {
         //LogUtil.logI(SpUtils.getOrder("order") + "开始的order");
 
-        CommonUtil.getInstance().robTask(new Action1<RobTask>() {
+        CommonUtil.getInstance().robTask(new Action1<CommendTask>() {
             @Override
-            public void call(RobTask robTask) {
+            public void call(CommendTask robTask) {
                 if (robTask != null) {
                     try {
                         mRobTask = robTask;
@@ -389,7 +388,7 @@ public class ViewUtil {
      *
      * @param mActivity 当前Activity,
      */
-    public void showRobDutyDialog(final Activity mActivity, RobTask robTask) {
+    public void showRobDutyDialog(final Activity mActivity, CommendTask robTask) {
         showRobDutyDialog(mActivity, robTask, R.layout.dialog_game_or_task_or_gift, null);
     }
 
@@ -398,7 +397,7 @@ public class ViewUtil {
      *
      * @param mActivity 当前Activity,
      */
-    public void showRobDutyDialog(final Activity mActivity, RobTask robTask, @LayoutRes int layoutId, Action1<View> action1) {
+    public void showRobDutyDialog(final Activity mActivity, CommendTask robTask, @LayoutRes int layoutId, Action1<View> action1) {
         View view = LayoutInflater.from(mActivity).inflate(layoutId, null, false);
         final AlertDialog mAlertDialog = new AlertDialog.Builder(mActivity, R.style.MyDialogActivityTheme)
                 .setView(view)

+ 3 - 4
app/src/main/java/com/sheep/gamegroup/view/dialog/DialogGameOrTaskOrGift.java

@@ -14,7 +14,7 @@ import com.sheep.gamegroup.model.entity.CashAwarsEntity;
 import com.sheep.gamegroup.model.entity.CommendApp;
 import com.sheep.gamegroup.model.entity.GiftBag;
 import com.sheep.gamegroup.model.entity.GiftBagApp;
-import com.sheep.gamegroup.model.entity.RobTask;
+import com.sheep.gamegroup.model.entity.CommendTask;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.DataKey;
@@ -27,7 +27,6 @@ import com.sheep.gamegroup.view.activity.ActMain;
 import com.sheep.gamegroup.view.adapter.GiftCenterAdapter;
 import com.sheep.gamegroup.view.adapter.WelfareAdapter;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
-import com.sheep.jiuyan.samllsheep.Config;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
@@ -319,9 +318,9 @@ public class DialogGameOrTaskOrGift {
 
     //显示抢任务弹出框
     private void showTaskDialog() {
-        CommonUtil.getInstance().robTask(new Action1<RobTask>() {
+        CommonUtil.getInstance().robTask(new Action1<CommendTask>() {
             @Override
-            public void call(RobTask robTask) {
+            public void call(CommendTask robTask) {
                 if (robTask != null) {
                     DataUtil.putAsInt(DataKey.KEY_ORDER, robTask.getOrder());
                     ViewUtil.newInstance().showRobDutyDialog(activity, robTask);

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

@@ -53,6 +53,7 @@ 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,6 +68,7 @@ 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.home.adapter.AdpHomeList;
+import com.sheep.gamegroup.module.home.adapter.AdpRefreshWelfare;
 import com.sheep.gamegroup.module.skin.util.SkinUtil;
 import com.sheep.gamegroup.presenter.SmallSheepContract;
 import com.sheep.gamegroup.presenter.SmallSheepPresenter;
@@ -87,6 +89,7 @@ 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;
@@ -309,12 +312,6 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
     public void toActMsg() {
         startActivity(new Intent(activity, ActMsg.class));
     }
-    @OnClick(R.id.homepage_item_notice_info_tv)
-    public void toNoticeInfo() {
-        BulletinEnty item = ListUtil.getItem(bulletinEntyList, homepageItemNoticeMv.getPosition());
-        if(item != null)
-            onClickNotice(item);
-    }
 
     /**
      * 兑换红包
@@ -585,6 +582,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
                 .build()
                 .inject(this);
         recyclerInitView();
+        initRefreshWelfareList();
 //        ViewGroup.LayoutParams bannerLayoutParams = banner.getLayoutParams();
         initBannerHeight();
 //        bannerLayoutParams.height = bannerHeight;//图片比例发生变化 :306*720
@@ -906,6 +904,15 @@ 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);
+        });
         if (!isFirst) {
             for (int i = 0; i < mAdapter.getCount(); i++) {
                 FgtHomeTaskReleaseList item = (FgtHomeTaskReleaseList) mAdapter.getItem(i);
@@ -917,6 +924,26 @@ 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
      */

+ 4 - 4
app/src/main/java/com/sheep/jiuyan/samllsheep/ui/activity/SignActivity.java

@@ -16,7 +16,7 @@ import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.Lp;
 import com.sheep.gamegroup.model.entity.PunchAndSign;
 import com.sheep.gamegroup.model.entity.RechargeLog;
-import com.sheep.gamegroup.model.entity.RobTask;
+import com.sheep.gamegroup.model.entity.CommendTask;
 import com.sheep.gamegroup.model.entity.SheepSignResult;
 import com.sheep.gamegroup.model.entity.UserSign;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
@@ -393,7 +393,7 @@ public class SignActivity extends BaseUMActivity {
                 });
     }
 
-    private void showSignResultAndTask(final String title, final double money, RobTask robTask) {
+    private void showSignResultAndTask(final String title, final double money, CommendTask robTask) {
         ViewUtil.newInstance().showRobDutyDialog(this, robTask, R.layout.dialog_sign_result_and_task, new Action1<View>() {
             @Override
             public void call(View view) {
@@ -404,9 +404,9 @@ public class SignActivity extends BaseUMActivity {
     }
 
     private void tryShowSignResultAndTask(final String title, final double money) {
-        CommonUtil.getInstance().robTask(new Action1<RobTask>() {
+        CommonUtil.getInstance().robTask(new Action1<CommendTask>() {
             @Override
-            public void call(RobTask robTask) {
+            public void call(CommendTask robTask) {
                 if (robTask != null) {
                     DataUtil.putAsInt(DataKey.KEY_ORDER, robTask.getOrder());
                     try {

+ 1 - 0
app/src/main/res/drawable/shape_bg_null.xml

@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
     android:shape="rectangle">
+    <solid android:color="@color/white"/>
 </shape>

+ 6 - 0
app/src/main/res/drawable/shape_solid_ffcad7_radius_4.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <corners android:radius="4dp" />
+    <solid android:color="#FFCAD7" />
+</shape>

+ 36 - 12
app/src/main/res/layout/homepage_act_layout.xml

@@ -47,22 +47,23 @@
                     android:id="@+id/home_notice_ll"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
+                    android:layout_below="@id/banner"
                     android:layout_marginTop="@dimen/content_padding"
                     android:background="@android:color/white"
-                    android:orientation="vertical"
-                    android:layout_below="@id/banner">
+                    android:orientation="vertical">
 
                     <include layout="@layout/homepage_item_notice_and_currenttime" />
 
                     <View
                         android:layout_width="match_parent"
                         android:layout_height="1dp"
-                        android:visibility="gone"
-                        android:background="@color/color_bg_line_home" />
+                        android:background="@color/color_bg_line_home"
+                        android:visibility="gone" />
 
                     <include
                         layout="@layout/homepage_item_notice"
                         android:visibility="gone" />
+
                     <include
                         layout="@layout/homepage_item_currenttime_reward"
                         android:visibility="gone" />
@@ -72,9 +73,9 @@
                     android:id="@+id/home_list_rv"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
+                    android:layout_below="@id/home_notice_ll"
                     android:layout_marginTop="13dp"
-                    android:background="@android:color/white"
-                    android:layout_below="@id/home_notice_ll" />
+                    android:background="@android:color/white" />
 
                 <!--超维对决HomeList-->
                 <android.support.v7.widget.RecyclerView
@@ -82,14 +83,15 @@
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_below="@id/home_list_more_iv" />
+
                 <ImageView
                     android:id="@+id/home_list_more_iv"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="-1dp"
+                    android:layout_below="@id/home_list_rv"
                     android:layout_centerHorizontal="true"
-                    android:src="@drawable/bg_to_bottom"
-                    android:layout_below="@id/home_list_rv"/>
+                    android:layout_marginTop="-1dp"
+                    android:src="@drawable/bg_to_bottom" />
 
                 <LinearLayout
                     android:id="@+id/home_award_container"
@@ -97,16 +99,38 @@
                     android:layout_height="wrap_content"
                     android:layout_below="@id/full_home_list_rv"
                     android:background="@color/white">
+
                     <include layout="@layout/homepage_item_get_award" />
                 </LinearLayout>
+
+                <LinearLayout
+                    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>
+
                 <LinearLayout
                     android:id="@+id/home_vp_ll"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
+                    android:layout_below="@id/hp_refresh_welfare_box"
                     android:layout_marginTop="@dimen/content_padding"
                     android:background="@android:color/white"
-                    android:orientation="vertical"
-                    android:layout_below="@id/home_award_container">
+                    android:orientation="vertical">
 
                     <android.support.v7.widget.RecyclerView
                         android:id="@+id/recyclerview"
@@ -184,6 +208,6 @@
         layout="@layout/view_float_title_card"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_below="@id/to_search_but_rl"/>
+        android:layout_below="@id/to_search_but_rl" />
 
 </RelativeLayout>

+ 13 - 10
app/src/main/res/layout/homepage_item_notice_and_currenttime.xml

@@ -31,8 +31,7 @@
 
         <com.sunfusheng.marqueeview.MarqueeView
             android:id="@+id/homepage_item_notice_mv"
-            android:layout_width="0dp"
-            android:layout_weight="1"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:minHeight="20dp"
             android:paddingEnd="@dimen/content_padding_10"
@@ -43,16 +42,20 @@
             app:mvSingleLine="true"
             app:mvTextColor="@color/white"
             app:mvTextSize="11sp" />
-        <TextView
-            android:id="@+id/homepage_item_notice_info_tv"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textSize="10sp"
-            android:textColor="#37C1F3"
-            android:layout_marginEnd="9dp"
-            android:text="详情"/>
     </LinearLayout>
 
+    <TextView
+        android:id="@+id/homepage_item_notice_info_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentEnd="true"
+        android:layout_alignTop="@id/homepage_notice_layout"
+        android:layout_alignBottom="@id/homepage_notice_layout"
+        android:gravity="center_vertical"
+        android:textSize="10sp"
+        android:textColor="#37C1F3"
+        android:layout_marginEnd="9dp"
+        android:text="详情"/>
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"

+ 51 - 0
app/src/main/res/layout/hp_game_welfare_entrance.xml

@@ -0,0 +1,51 @@
+<?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">
+
+    <TextView
+        android:id="@+id/hp_gwe_tv1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="16dp"
+        android:background="@drawable/shape_solid_ffcad7_radius_4"
+        android:paddingStart="5dp"
+        android:paddingTop="4dp"
+        android:paddingEnd="5dp"
+        android:paddingBottom="4dp"
+        android:text="游戏福利"
+        android:textColor="#F02155"
+        android:textSize="13sp"
+        app:layout_constraintBottom_toBottomOf="@id/hp_gwe_tv2"
+        app:layout_constraintTop_toTopOf="@id/hp_gwe_tv2"
+        app:layout_constraintStart_toStartOf="parent" />
+
+    <TextView
+        android:id="@+id/hp_gwe_tv2"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="进入福利专区"
+        android:textColor="#ff2ebef2"
+        android:textSize="13sp"
+        android:paddingTop="5dp"
+        android:paddingBottom="5dp"
+        android:paddingStart="6dp"
+        android:paddingEnd="4dp"
+        android:layout_marginTop="20dp"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintStart_toEndOf="@id/hp_gwe_tv1" />
+
+    <ImageView
+        android:layout_width="5dp"
+        android:layout_height="wrap_content"
+        android:adjustViewBounds="true"
+        android:scaleType="fitXY"
+        android:src="@mipmap/xiaojiant"
+        app:layout_constraintBottom_toBottomOf="@id/hp_gwe_tv2"
+        app:layout_constraintStart_toEndOf="@id/hp_gwe_tv2"
+        app:layout_constraintTop_toTopOf="@id/hp_gwe_tv2" />
+
+
+</android.support.constraint.ConstraintLayout>

+ 274 - 0
app/src/main/res/layout/item_hp_refresh_welfare.xml

@@ -0,0 +1,274 @@
+<?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">
+
+    <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"
+        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">
+
+                <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>
+
+
+        <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:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="12dp"
+        android:layout_marginTop="16dp"
+        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" />
+
+    <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>

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