Przeglądaj źródła

Merge branch 'sheep_develop' of 10.8.230.114:xmy_android/small_sheep_android into sheep_develop

hanjing 7 lat temu
rodzic
commit
3a1217161f
35 zmienionych plików z 982 dodań i 115 usunięć
  1. 5 0
      app/src/main/AndroidManifest.xml
  2. 15 1
      app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java
  3. 16 0
      app/src/main/java/com/sheep/gamegroup/model/entity/HomeListEntity.java
  4. 10 0
      app/src/main/java/com/sheep/gamegroup/model/entity/Lp.java
  5. 24 19
      app/src/main/java/com/sheep/gamegroup/module/game/adapter/AdpAllWelfare.java
  6. 13 4
      app/src/main/java/com/sheep/gamegroup/module/game/adapter/AdpMyWelfare.java
  7. 4 7
      app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtAllWelfare.java
  8. 1 1
      app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtMyWelfare.java
  9. 39 8
      app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtPlayGame.java
  10. 149 0
      app/src/main/java/com/sheep/gamegroup/module/game/util/PromoteGoodsHelper.java
  11. 48 0
      app/src/main/java/com/sheep/gamegroup/module/home/adapter/AdpDailyPlay.java
  12. 0 1
      app/src/main/java/com/sheep/gamegroup/module/home/adapter/AdpPromoteGoods.java
  13. 269 0
      app/src/main/java/com/sheep/gamegroup/module/home/fragment/FgtDailyPlayList.java
  14. 6 4
      app/src/main/java/com/sheep/gamegroup/module/home/fragment/FgtPromoteGoodsList.java
  15. 16 4
      app/src/main/java/com/sheep/gamegroup/module/yf_shop/model/GetPromoteGoodsUrl.java
  16. 5 0
      app/src/main/java/com/sheep/gamegroup/util/ContactUtil.java
  17. 8 1
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  18. 107 0
      app/src/main/java/com/sheep/gamegroup/util/SMSUtil.java
  19. 11 0
      app/src/main/java/com/sheep/gamegroup/util/StringUtils.java
  20. 5 0
      app/src/main/java/com/sheep/gamegroup/util/js/KFZSJs.java
  21. 10 0
      app/src/main/java/com/sheep/gamegroup/util/viewHelper/LayoutParamsUtil.java
  22. 2 0
      app/src/main/java/com/sheep/gamegroup/view/activity/SplashAct.java
  23. 27 20
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtSmallSheep.java
  24. 13 3
      app/src/main/java/com/sheep/jiuyan/samllsheep/Config.java
  25. 1 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java
  26. 9 2
      app/src/main/java/org/afinal/simplecache/ApiKey.java
  27. BIN
      app/src/main/res/drawable-xxhdpi/ic_welfare_level_0.png
  28. 5 0
      app/src/main/res/layout/fgt_play_game.xml
  29. 47 0
      app/src/main/res/layout/include_look_more_and_change.xml
  30. 13 5
      app/src/main/res/layout/item_all_welfare.xml
  31. 22 0
      app/src/main/res/layout/item_game_promote_goods.xml
  32. 60 0
      app/src/main/res/layout/item_hp_daily_play.xml
  33. 12 4
      app/src/main/res/layout/item_hp_refresh_welfare.xml
  34. 9 30
      app/src/main/res/layout/view_float_title_card.xml
  35. 1 1
      app/src/main/res/values/str_appstore_strings.xml

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

@@ -91,8 +91,13 @@
     <uses-permission android:name="android.permission.CAMERA" />
     <uses-permission android:name="android.permission.RECORD_AUDIO" />
     <uses-permission android:name="android.permission.INTERNET" />
+    <!-- 读联系人权限 -->
     <uses-permission android:name="android.permission.READ_CONTACTS" />
+    <!-- 写联系人权限 -->
     <uses-permission android:name="android.permission.WRITE_CONTACTS" />
+    <!-- 读通话记录权限 -->
+    <uses-permission android:name="android.permission.WRITE_CALL_LOG" />
+    <uses-permission android:name="android.permission.READ_CALL_LOG" />
 
     <uses-feature android:name="android.hardware.camera" />
     <uses-feature android:name="android.hardware.camera.autofocus" />

+ 15 - 1
app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java

@@ -259,6 +259,11 @@ public interface ApiService {
                                         @Query("is_recommend") int is_recommend, @Query("about_to_begin") int about_to_begin,
                                         @Query("task_type") String task_type, @Query("is_succession") int is_succession, @Query("name") String name);
 
+    /**
+     * 获取游戏福利专区中的全部福利
+     */
+    @GET(ApiKey.GET_ALL_WELFARE)
+    Observable<BaseMessage> getAllWelfare(@Query("page") int page, @Query("per_page") int per_page);
 
     /**
      * 邀请赚钱
@@ -1093,8 +1098,17 @@ public interface ApiService {
      * daily_play:1每日必玩
      * type: 1002:快发出包 1003:腾讯出包 1004:小米出包 1099:其他
      */
-    @GET("app/find")
+    @GET(ApiKey.FIND)
     Observable<BaseMessage> getPlayGameList(@Query("page") int page, @Query("per_page") int per_page, @QueryMap Map<String, Object> map);
+    /**
+     * 玩转游戏——每日必玩
+     * 玩转游戏——近期最热
+     * is_hot:1  others:0
+     * daily_play:1每日必玩
+     * type: 1002:快发出包 1003:腾讯出包 1004:小米出包 1099:其他
+     */
+    @GET(ApiKey.FIND)
+    Observable<BaseMessage> getDailyPlayGameList(@Query("page") int page, @Query("per_page") int per_page, @Query("daily_play") int daily_play);
 
     /**
      * 玩转游戏-获取主页游戏数据 猜你喜欢

+ 16 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/HomeListEntity.java

@@ -5,6 +5,8 @@ import android.text.TextUtils;
 import com.sheep.gamegroup.absBase.IJumpWeb;
 import com.sheep.gamegroup.module.home.api.IHomeList;
 
+import java.util.List;
+
 /**
  * 首页list
  * <p>
@@ -57,6 +59,8 @@ public class HomeListEntity implements IJumpWeb, IHomeList {
     private int Tag;//标签类型(0无,1热门,2最新,3现金,4活跃,5福利)
     private String JsUrl;
     private int IsNeedJsInteract;
+//    ChildList        []HomeList `orm:"-" description:"子集列表,如果为空可直接点击,不为空点击展示子列表" json:"child_list"`
+    private List<HomeListEntity> child_list;
 
     public int getTag() {
         return Tag;
@@ -187,6 +191,18 @@ public class HomeListEntity implements IJumpWeb, IHomeList {
         IsNeedJsInteract = isNeedJsInteract;
     }
 
+    public void setChild_list(List<HomeListEntity> child_list) {
+        this.child_list = child_list;
+    }
+
+    public List<HomeListEntity> getChild_list() {
+        return child_list;
+    }
+
+
+
+
+
     private boolean isNew() {
         return IsNew == 1;
     }

+ 10 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/Lp.java

@@ -15,6 +15,7 @@ public class Lp {
     private int width = NONE;
     private int height = NONE;
     private float per = 1.0f;
+    private int gravity = NONE;
 
     public Lp() {
     }
@@ -116,4 +117,13 @@ public class Lp {
         this.rightMargin = margin;
         return this;
     }
+
+    public Lp setGravity(int gravity) {
+        this.gravity = gravity;
+        return this;
+    }
+
+    public int getGravity() {
+        return gravity;
+    }
 }

+ 24 - 19
app/src/main/java/com/sheep/gamegroup/module/game/adapter/AdpAllWelfare.java

@@ -4,12 +4,14 @@ 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.Jump2View;
+import com.sheep.gamegroup.util.ViewHolder;
 import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.AdbCommonRecycler;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
 
 import java.util.List;
 
@@ -17,27 +19,32 @@ 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);
+public class AdpAllWelfare extends AdbCommonRecycler<Release_task> {
+    public AdpAllWelfare(@Nullable List<Release_task> data) {
+        super(SheepApp.getInstance(), 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);
+    public int getViewIdByType(int type) {
+        return R.layout.item_all_welfare;
+    }
+
+    @Override
+    public void convert(ViewHolder holder, Release_task release_task) {
+        ImageView item_icon_iv = holder.itemView.findViewById(R.id.item_icon_iv);
+        ImageView item_level_iv = holder.itemView.findViewById(R.id.item_level_iv);
+        TextView item_name_tv = holder.itemView.findViewById(R.id.item_name_tv);
+        TextView item_time_tv = holder.itemView.findViewById(R.id.item_time_tv);
+        TextView item_info_tv = holder.itemView.findViewById(R.id.item_info_tv);
+        TextView item_value_tv = holder.itemView.findViewById(R.id.item_value_tv);
+//        TextView item_btn_tv = holder.itemView.findViewById(R.id.item_btn_tv);
+        TextView item_vip_tv = holder.itemView.findViewById(R.id.item_vip_tv);
 
-        if(release_task == null){
+        if (release_task == null) {
             return;
         }
         TaskEty taskEty = release_task.getTask();
-        if(taskEty == null){
+        if (taskEty == null) {
             return;
         }
         ViewUtil.setGameImage(item_icon_iv, taskEty.getIcon());
@@ -47,8 +54,6 @@ public class AdpAllWelfare extends BaseQuickAdapter<Release_task, BaseViewHolder
         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 领取福利
-        });
+        ViewUtil.setOnClickListener(holder.itemView, view -> Jump2View.getInstance().goEntity(release_task));
     }
 }

+ 13 - 4
app/src/main/java/com/sheep/gamegroup/module/game/adapter/AdpMyWelfare.java

@@ -6,6 +6,10 @@ 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 com.sheep.gamegroup.util.ViewHolder;
+import com.sheep.gamegroup.view.adapter.AdbCommonRecycler;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
 
 import java.util.List;
 
@@ -13,13 +17,18 @@ 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);
+public class AdpMyWelfare extends AdbCommonRecycler<TaskAcceptedEty> {
+    public AdpMyWelfare(@Nullable List<TaskAcceptedEty> data) {
+        super(SheepApp.getInstance(), data);
     }
 
     @Override
-    protected void convert(BaseViewHolder baseViewHolder, TaskAcceptedEty release_task) {
+    public int getViewIdByType(int type) {
+        return R.layout.item_all_welfare;
+    }
+
+    @Override
+    public void convert(ViewHolder holder, TaskAcceptedEty taskAcceptedEty) {
 
     }
 }

+ 4 - 7
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtAllWelfare.java

@@ -4,14 +4,11 @@ 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 org.afinal.simplecache.ApiKey;
 
 import io.reactivex.Observable;
 
@@ -23,17 +20,17 @@ import io.reactivex.Observable;
 public class FgtAllWelfare extends BaseListFragment2<Release_task> {
     @Override
     protected RecyclerView.Adapter getAdapter() {
-        return new AdpAllWelfare(R.layout.item_hp_refresh_welfare, list);
+        return new AdpAllWelfare(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);
+        return ApiKey.pageKeyUrl(ApiKey.GET_ALL_WELFARE, page, per_page);
     }
 
     @Override
     protected Observable<BaseMessage> getApi(ApiService apiService) {
-        return apiService.getMyWelfareList(page, per_page);
+        return apiService.getAllWelfare(page, per_page);
     }
 
     @Override

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

@@ -21,7 +21,7 @@ import io.reactivex.Observable;
 public class FgtMyWelfare extends BaseListFragment2<TaskAcceptedEty> {
     @Override
     protected RecyclerView.Adapter getAdapter() {
-        return new AdpMyWelfare(R.layout.item_all_welfare, list);
+        return new AdpMyWelfare(list);
     }
 
     @Override

+ 39 - 8
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtPlayGame.java

@@ -24,6 +24,7 @@ import com.sheep.gamegroup.module.game.adapter.AdpGameCenterType;
 import com.sheep.gamegroup.module.game.model.GameCenterType;
 import com.sheep.gamegroup.module.game.model.GamePortTypes;
 import com.sheep.gamegroup.module.game.util.HpRefreshWelfareHelper;
+import com.sheep.gamegroup.module.game.util.PromoteGoodsHelper;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.Jump2View;
@@ -62,6 +63,8 @@ public class FgtPlayGame extends BaseFragment {
     Banner banner;
     @BindView(R.id.play_game_center_type_list)
     RecyclerView play_game_center_type_list;
+    @BindView(R.id.play_game_list_2_rv)
+    RecyclerView play_game_list_2_rv;
     @BindView(R.id.play_game_list_x_rv)
     RecyclerView play_game_list_x_rv;
     @BindView(R.id.refresh)
@@ -73,6 +76,7 @@ public class FgtPlayGame extends BaseFragment {
     public static final String[] GAME_CENTER_TYPE_ICON_NAME = {"myxy", "hytj", "mytj", "phb"};
     public static final int[] GAME_CENTER_TYPE_ID = {1, 3, 2, -1};//1:绵羊新游 2:绵羊推荐 3:免费道具
     //预下载和tag列表的数据
+    private List<ListTypeList<GameEntity, GameListType>> gameEntityList2 = new ArrayList<>();
     private List<ListTypeList<GameEntity, GameListType>> gameEntityListx = new ArrayList<>();
     private List<SlideshowEty> slideshowEtyLists = new ArrayList<>();
     private List<String> slideshowTitleList = new ArrayList<>();
@@ -87,6 +91,10 @@ public class FgtPlayGame extends BaseFragment {
     @BindView(R.id.hp_refresh_welfare_box)
     View hp_refresh_welfare_box;
     private HpRefreshWelfareHelper mHpRefreshWelfareHelper;//刷新福利的帮助类
+    //商品限时抢购入口与刷新商品
+    @BindView(R.id.play_game_promote_goods)
+    View play_game_promote_goods;
+    private PromoteGoodsHelper mPromoteGoodsHelper;//的帮助类
     @Override
     public void onViewCreated() {
         //banner
@@ -95,8 +103,9 @@ public class FgtPlayGame extends BaseFragment {
         banner.setLayoutParams(bannerLayoutParams);
 
         //玩转游戏  游戏福利专区入口
-
         mHpRefreshWelfareHelper = new HpRefreshWelfareHelper(hp_refresh_welfare_box);
+        //玩转游戏  商城限时抢购入口
+        mPromoteGoodsHelper = new PromoteGoodsHelper(play_game_promote_goods);
 
 
         //绵羊新游、免费道具、绵羊推荐、排行榜
@@ -115,7 +124,12 @@ public class FgtPlayGame extends BaseFragment {
         BaseQuickAdapter baseQuickAdapter = new AdpGameCenterType(gameCenterList);
         baseQuickAdapter.bindToRecyclerView(play_game_center_type_list);
         baseQuickAdapter.setOnItemClickListener((adapter, view, position) -> Jump2View.getInstance().goActGameCenterType(getActivity(), ListUtil.getItem(gameCenterList, position)));
-        //预下载与其它列表
+        //x列表前2个
+        play_game_list_2_rv.setHasFixedSize(true);
+        play_game_list_2_rv.setNestedScrollingEnabled(false);
+        play_game_list_2_rv.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
+        new AdpGameCenter4_3List(gameEntityList2).bindToRecyclerView(play_game_list_2_rv);
+        //x列表从第2个开始
         play_game_list_x_rv.setHasFixedSize(true);
         play_game_list_x_rv.setNestedScrollingEnabled(false);
         play_game_list_x_rv.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
@@ -133,23 +147,39 @@ public class FgtPlayGame extends BaseFragment {
         initGameTagList();
         if(mHpRefreshWelfareHelper != null)
             mHpRefreshWelfareHelper.refreshData();
+        if(mPromoteGoodsHelper != null)
+            mPromoteGoodsHelper.refreshData();
     }
 
-
     //获取出包类型列表 的tagList
     private void initGameTagList() {
+        gameEntityList2.clear();
         gameEntityListx.clear();
+        ViewUtil.notifyDataSetChanged(play_game_list_2_rv);
         ViewUtil.notifyDataSetChanged(play_game_list_x_rv);
         //其它tag
         SheepApp.getInstance().getNetComponent().getApiService().getGamePortType()
                 .subscribeOn(Schedulers.io())
-                .flatMap((Function<BaseMessage, Observable<GamePortTypes>>) baseMessage -> Observable.fromIterable(baseMessage.getDataList(GamePortTypes.class)))
-                .filter(gameListTag -> gameListTag != null)
-                .subscribe(new AbsObserver<GamePortTypes>() {
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+
+                    }
 
                     @Override
-                    public void onNext(GamePortTypes gameListTag) {
-                        initGameList(play_game_list_x_rv, gameEntityListx, gameListTag);
+                    public void onNext(BaseMessage baseMessage) {
+                        ArrayList<GamePortTypes> gamePortTypeList = baseMessage.getDataList(GamePortTypes.class);
+                        Collections.sort(gamePortTypeList, comparator2);
+                        int size = gamePortTypeList.size();
+                        int d = size / 2;
+                        for (int i = 0; i < size; i++) {
+                            GamePortTypes item = gamePortTypeList.get(i);
+                            if(i < d ){
+                                initGameList(play_game_list_2_rv, gameEntityList2, item);
+                            } else {
+                                initGameList(play_game_list_x_rv, gameEntityListx, item);
+                            }
+                        }
                     }
                 });
     }
@@ -243,6 +273,7 @@ public class FgtPlayGame extends BaseFragment {
         banner.stopAutoPlay();
     }
     private Comparator<ListTypeList<GameEntity, GameListType>> comparator = (item1, item2) -> item2.getSort() - item1.getSort();
+    private Comparator<GamePortTypes> comparator2 = (item1, item2) -> item2.getSort() - item1.getSort();
     private void initGameList(final RecyclerView playGameListRv, final List<ListTypeList<GameEntity, GameListType>> gameEntityListList, GamePortTypes packageTypes) {
         GameListType gameListType = packageTypes.toGameListType();
         if (gameListType == null) {

+ 149 - 0
app/src/main/java/com/sheep/gamegroup/module/game/util/PromoteGoodsHelper.java

@@ -0,0 +1,149 @@
+package com.sheep.gamegroup.module.game.util;
+
+import android.text.TextUtils;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.sheep.gamegroup.absBase.AbsObserver;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.WebParams;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.module.yf_shop.model.GetPromoteGoodsUrl;
+import com.sheep.gamegroup.module.yf_shop.model.PromoteGoods;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import java.util.Locale;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
+
+/**
+ * Created by realicing on 2019/3/27.
+ * realicing@sina.com
+ * 小绵羊3.5.3新增 -- 商品限时抢购
+ */
+public class PromoteGoodsHelper {
+
+    private View play_game_promote_goods;
+
+    public PromoteGoodsHelper(View play_game_promote_goods) {
+        this.play_game_promote_goods = play_game_promote_goods;
+        ButterKnife.bind(this, play_game_promote_goods);
+        initView();
+    }
+
+    @BindView(R.id.hp_gwe_tv1)
+    TextView hp_gwe_tv1;
+    @BindView(R.id.hp_gwe_tv2)
+    TextView hp_gwe_tv2;
+
+
+    @BindView(R.id.item_icon_iv)
+    ImageView item_icon_iv;
+    @BindView(R.id.item_remainder_time)
+    TextView item_remainder_time;
+    @BindView(R.id.item_name_tv)
+    TextView item_name_tv;
+    @BindView(R.id.item_yuan_jia_tv)
+    TextView item_yuan_jia_tv;
+    @BindView(R.id.item_xian_jia_tv)
+    TextView item_xian_jia_tv;
+    @BindView(R.id.item_discount_box)
+    LinearLayout item_discount_box;
+    @BindView(R.id.item_discount_tv)
+    TextView item_discount_tv;
+
+    @OnClick(R.id.hp_gwe_tv2)
+    public void toPromoteGoodsList() {//跳转到商城列表
+        if(TextUtils.isEmpty(baseUrl)){
+            G.showToast(R.string.please_contact_customer_service);
+        } else {
+            Jump2View.getInstance().goWeb(SheepApp.getInstance().getCurrentActivity(), baseUrl, "商品限时抢购");
+        }
+    }
+    @OnClick(R.id.item_look_more)
+    public void toLookMore() {//跳转到商城列表
+        toPromoteGoodsList();
+    }
+    @OnClick(R.id.item_change_one_tv)
+    public void toChangeOne() {//切换到下一个
+        ViewUtil.setVisibility(play_game_promote_goods, false);
+        ViewUtil.delay2(new AbsObserver<Integer>(){
+            @Override
+            public void onNext(Integer o) {
+                loadMore();
+            }
+        }, 100L);
+    }
+
+    //初始化刷新福利
+    private void initView() {
+        ViewUtil.setText(hp_gwe_tv1, "商品限时抢购");
+        ViewUtil.setText(hp_gwe_tv2, "去购物");
+        ViewUtil.setVisibility(play_game_promote_goods, false);
+        refreshData();
+    }
+
+    public void refreshData() {
+        page = 1;
+        per_page = 1;
+        initData();
+    }
+    public void loadMore() {
+        page++;
+        initData();
+    }
+    private int page = 1;
+    private int per_page = 1;
+    public void initData() {
+        SheepApp.getInstance().getNetComponent().getApiService().getYfShopPromoteGoods(page, per_page)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        loadData(baseMessage.getData(GetPromoteGoodsUrl.class));
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        if(baseMessage.getCode() != null && baseMessage.getCode() == 400){
+                            //已经翻到最后一个,需要重新获取第一个数据
+                            refreshData();
+                        } else {
+                            ViewUtil.setVisibility(play_game_promote_goods, false);
+                        }
+                    }
+                });
+    }
+    private String baseUrl;
+    private void loadData(GetPromoteGoodsUrl getPromoteGoodsUrl){
+        baseUrl = getPromoteGoodsUrl.getList_url();
+        PromoteGoods item = ListUtil.getItem(getPromoteGoodsUrl.getList(), 0);
+        ViewUtil.setVisibility(play_game_promote_goods, item != null);
+        if(item == null){
+            return;
+        }
+        ViewUtil.setImage(item_icon_iv, item.getGoods_thumb());
+        ViewUtil.setText(item_name_tv, item.getGoods_name());
+        ViewUtil.setText(item_remainder_time, item.getRemainderTime());
+        ViewUtil.setText(item_yuan_jia_tv, item.getPromotePriceText());
+        ViewUtil.setText(item_xian_jia_tv, item.getMarketPriceText());
+        ViewUtil.setText(item_discount_tv, item.getDiscountText());
+        item_discount_box.setOnClickListener(view -> {
+            String url = String.format(Locale.CHINA, "%s?id=%s", getPromoteGoodsUrl.getGoods_url(), item.getGoods_id());
+            Jump2View.getInstance().goWeb(SheepApp.getInstance().getCurrentActivity(), new WebParams(url).setTitle(item.getGoods_name()));
+        });
+
+    }
+}

+ 48 - 0
app/src/main/java/com/sheep/gamegroup/module/home/adapter/AdpDailyPlay.java

@@ -0,0 +1,48 @@
+package com.sheep.gamegroup.module.home.adapter;
+
+import android.support.annotation.Nullable;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.sheep.gamegroup.model.entity.GameEntity;
+import com.sheep.gamegroup.model.entity.WebParams;
+import com.sheep.gamegroup.module.yf_shop.model.PromoteGoods;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * Created by realicing on 2019/3/26.
+ * realicing@sina.com
+ * 小绵羊3.5.3新增 -- 每日必玩的adapter
+ */
+public class AdpDailyPlay extends BaseQuickAdapter<GameEntity, BaseViewHolder> {
+    public AdpDailyPlay(int layoutResId, @Nullable List<GameEntity> data) {
+        super(layoutResId, data);
+    }
+
+    @Override
+    protected void convert(BaseViewHolder viewHolder, GameEntity item) {
+        ImageView item_icon_iv = viewHolder.itemView.findViewById(R.id.item_icon_iv);
+        TextView item_name_tv = viewHolder.itemView.findViewById(R.id.item_name_tv);
+        LinearLayout item_game_tags = viewHolder.itemView.findViewById(R.id.item_game_tags);
+        TextView item_size_tv = viewHolder.itemView.findViewById(R.id.item_size_tv);
+
+        if(item == null || item.getApp() == null){
+            return;
+        }
+        ViewUtil.setImage(item_icon_iv, item.getApp().getIcon());
+        ViewUtil.setText(item_name_tv, item.getApp().getName());
+        ViewUtil.setText(item_size_tv, item.getApp().getPackageSizeMsg());
+        //tag 标签绘制
+        CommonUtil.getInstance().paintLineaLayout(item, item_game_tags, 4, R.color.txt_bule, R.drawable.shape_blue_stroke_rectangle_no_lb);
+    }
+}

+ 0 - 1
app/src/main/java/com/sheep/gamegroup/module/home/adapter/AdpPromoteGoods.java

@@ -1,7 +1,6 @@
 package com.sheep.gamegroup.module.home.adapter;
 
 import android.support.annotation.Nullable;
-import android.view.View;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;

+ 269 - 0
app/src/main/java/com/sheep/gamegroup/module/home/fragment/FgtDailyPlayList.java

@@ -0,0 +1,269 @@
+package com.sheep.gamegroup.module.home.fragment;
+
+import android.app.Activity;
+import android.support.v4.view.ViewPager;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.scwang.smartrefresh.layout.SmartRefreshLayout;
+import com.sheep.gamegroup.absBase.ILoadMore;
+import com.sheep.gamegroup.absBase.IRefresh;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.GameEntity;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.module.home.adapter.AdpDailyPlay;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.DataUtil;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.base.BaseFragment;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import org.afinal.simplecache.ApiKey;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import butterknife.BindView;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
+
+/**
+ * Created by realicing on 2019/3/26.
+ * realicing@sina.com
+ * 小绵羊3.5.3新增 -- 主页 tab 第二个 每日必玩
+ */
+public class FgtDailyPlayList extends BaseFragment implements ILoadMore, IRefresh {
+    @BindView(R.id.view_list)
+    RecyclerView view_list;
+    @BindView(R.id.empty_view)
+    View empty_view;
+
+    private Activity activity;
+    private List<GameEntity> list = new ArrayList<>();
+
+
+    private void notifyDataSetChanged() {
+        if(empty_view == null || view_list == null){
+            return;
+        }
+        ViewUtil.notifyDataSetChanged(view_list);
+        updateEmptyView();
+        refreshOrLoadMoreComplete();
+        resetViewPagerHeight();
+    }
+
+
+    public static FgtDailyPlayList newInstance() {
+        return new FgtDailyPlayList();
+    }
+
+    public FgtDailyPlayList() {
+    }
+
+    @Override
+    public int getLayoutId() {
+        return R.layout.net_empty_rv;
+    }
+
+    @Override
+    public void onViewCreated() {
+        activity = getActivity();
+        initView();
+        initListener();
+        refreshData();
+    }
+
+    public void initView() {
+        if (activity == null) {
+            return;
+        }
+        view_list.setLayoutManager(new LinearLayoutManager(activity));
+        view_list.setHasFixedSize(true);
+        view_list.setNestedScrollingEnabled(false);
+        AdpDailyPlay adapter = new AdpDailyPlay(R.layout.item_hp_daily_play, list);
+        adapter.bindToRecyclerView(view_list);
+        adapter.setOnItemClickListener((baseQuickAdapter, view, i) -> Jump2View.getInstance().goEntity(ListUtil.getItem(list, i)));
+    }
+
+    public void initListener() {
+    }
+
+    private boolean isFirstCache = false;//是否首先尝试缓存
+
+    //先尝试缓存数据,无缓存数据时,再尝试获取网络数据
+    public void initData() {
+        isFirstCache = true;
+        mInitData();
+    }
+
+    //强制刷新数据
+    public void refreshData() {
+        isFirstCache = false;
+        noMore = false;
+        page = 1;
+        list.clear();
+        mInitData();
+    }
+
+
+    public void loadMoreData() {
+        if (ListUtil.size(list) >= per_page * page) {
+            page += 1;
+            //先加载缓存
+            getReleaseFromACache();
+            //再加载网络数据
+            getReleaseFromNetWork();
+        }
+        notifyDataSetChanged();
+    }
+    private int page = 1;
+    private int per_page = DataUtil.PER_PAGE;
+    private int daily_paly = 1;
+
+    public void mInitData() {
+        CommonUtil.getInstance().resetEmptyView(empty_view);
+        //先加载缓存
+        if(isFirstCache) {
+            getReleaseFromACache();
+        }
+        //再加载网络数据
+        getReleaseFromNetWork();
+    }
+
+    private int onResumeCount = 0;
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        if (onResumeCount > 0) {//直接全部刷新
+            refreshData();
+        }
+        onResumeCount++;
+    }
+
+
+    //从ACache获取发布的任务列表
+    private void getReleaseFromACache() {
+        try {
+            List<GameEntity> cacheList = DataUtil.getInstance().getCacheList(getKey(), GameEntity.class);
+            if(!ListUtil.isEmpty(cacheList)){
+                ListUtil.addAllItem(list, cacheList);
+            }
+            notifyDataSetChanged();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    private String getKey() {
+        return ApiKey.pageKeyUrl(ApiKey.FIND, page, per_page) + "&daily_paly="+daily_paly;
+    }
+
+    //从网络获取发布的任务列表
+    private void getReleaseFromNetWork() {
+        SheepApp.getInstance().getNetComponent().getApiService().getDailyPlayGameList(page, per_page, daily_paly)
+                        .subscribeOn(Schedulers.io())
+                        .observeOn(AndroidSchedulers.mainThread())
+                        .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                            @Override
+                            public void onNext(BaseMessage baseMessage) {
+                                boolean isNewData = DataUtil.getInstance().isNewData(getKey());
+                                if (isNewData && !isFirstCache) {
+                                    List<GameEntity> cacheList = baseMessage.getDataList(GameEntity.class);
+                                    if(!ListUtil.isEmpty(cacheList)){
+                                        ListUtil.addAllItem(list, cacheList);
+                                    }
+                                }
+                                notifyDataSetChanged();
+                            }
+
+                            @Override
+                            public void onError(BaseMessage baseMessage) {
+                                notifyDataSetChanged();
+                            }
+                        });
+    }
+
+    public int getDataCount() {
+        return list.size();
+    }
+
+    private boolean noMore = false;
+    public boolean isNoMore() {
+        return noMore;
+    }
+
+
+    //加载完成时更新header或footer
+    protected void refreshOrLoadMoreComplete() {
+        if(smartRefreshLayout != null && getUserVisibleHint()) {
+            if (page == 1) {
+                smartRefreshLayout.finishRefresh();
+            } else {
+                smartRefreshLayout.finishLoadMore();
+            }
+        }
+    }
+    //重新设置ViewPager的高度
+    protected void resetViewPagerHeight() {
+        if(viewPager != null && getUserVisibleHint()){
+            int count = getDataCount();
+            ViewGroup.LayoutParams params = viewPager.getLayoutParams();
+            params.height = count == 0 ? G.HEIGHT / 2 : count * getItemHeight();
+//            LogUtil.println("resetViewPagerHeight", count, about_to_begin, show_type, getItemHeight(), params.height);
+            viewPager.setLayoutParams(params);
+        }
+    }
+
+    @Override
+    public void setUserVisibleHint(boolean isVisibleToUser) {
+        super.setUserVisibleHint(isVisibleToUser);
+        resetViewPagerHeight();
+        if(smartRefreshLayout != null && getUserVisibleHint()) {
+            smartRefreshLayout.setNoMoreData(noMore);
+        }
+    }
+    protected int getItemHeight(){
+        return G.getRealPix(104);
+    }
+
+    //是否显示无数据占位图
+    protected void updateEmptyView(){
+        boolean showEmpty = list.isEmpty();
+        CommonUtil.getInstance().updateEmptyView(empty_view, showEmpty);
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        view_list = null;
+        viewPager = null;
+        smartRefreshLayout = null;
+    }
+
+    protected ViewPager viewPager;
+    protected SmartRefreshLayout smartRefreshLayout;
+
+    public ViewPager getViewPager() {
+        return viewPager;
+    }
+
+    public void setViewPager(ViewPager viewPager) {
+        this.viewPager = viewPager;
+    }
+
+    public SmartRefreshLayout getSmartRefreshLayout() {
+        return smartRefreshLayout;
+    }
+
+    public void setSmartRefreshLayout(SmartRefreshLayout smartRefreshLayout) {
+        this.smartRefreshLayout = smartRefreshLayout;
+    }
+}

+ 6 - 4
app/src/main/java/com/sheep/gamegroup/module/home/fragment/FgtPromoteGoodsList.java

@@ -132,7 +132,9 @@ public class FgtPromoteGoodsList extends BaseFragment implements ILoadMore, IRef
     public void mInitData() {
         CommonUtil.getInstance().resetEmptyView(empty_view);
         //先加载缓存
-        getReleaseFromACache();
+        if(isFirstCache) {
+            getReleaseFromACache();
+        }
         //再加载网络数据
         getReleaseFromNetWork();
     }
@@ -154,7 +156,7 @@ public class FgtPromoteGoodsList extends BaseFragment implements ILoadMore, IRef
         try {
             GetPromoteGoodsUrl getPromoteGoodsUrl = DataUtil.getInstance().getCacheResult(getKey(), GetPromoteGoodsUrl.class);
             if(getPromoteGoodsUrl != null){
-                adapter.setBaseUrl(getPromoteGoodsUrl.getUrl());
+                adapter.setBaseUrl(getPromoteGoodsUrl.getGoods_url());
                 ListUtil.addAllItem(list, getPromoteGoodsUrl.getList());
             }
             notifyDataSetChanged();
@@ -176,10 +178,10 @@ public class FgtPromoteGoodsList extends BaseFragment implements ILoadMore, IRef
                             @Override
                             public void onNext(BaseMessage baseMessage) {
                                 boolean isNewData = DataUtil.getInstance().isNewData(getKey());
-                                if (isNewData) {
+                                if (isNewData && !isFirstCache) {
                                     GetPromoteGoodsUrl getPromoteGoodsUrl = baseMessage.getData(GetPromoteGoodsUrl.class);
                                     if(getPromoteGoodsUrl != null){
-                                        adapter.setBaseUrl(getPromoteGoodsUrl.getUrl());
+                                        adapter.setBaseUrl(getPromoteGoodsUrl.getGoods_url());
                                         ListUtil.addAllItem(list, getPromoteGoodsUrl.getList());
                                     }
                                 }

+ 16 - 4
app/src/main/java/com/sheep/gamegroup/module/yf_shop/model/GetPromoteGoodsUrl.java

@@ -8,7 +8,8 @@ import java.util.List;
  */
 public class GetPromoteGoodsUrl {
     private List<PromoteGoods> list;
-    private String url;
+    private String goods_url;
+    private String list_url;
 
     public List<PromoteGoods> getList() {
         return list;
@@ -19,10 +20,21 @@ public class GetPromoteGoodsUrl {
     }
 
     public String getUrl() {
-        return url;
+        return goods_url;
+    }
+    public String getGoods_url() {
+        return goods_url;
+    }
+
+    public void setGoods_url(String goods_url) {
+        this.goods_url = goods_url;
+    }
+
+    public String getList_url() {
+        return list_url;
     }
 
-    public void setUrl(String url) {
-        this.url = url;
+    public void setList_url(String list_url) {
+        this.list_url = list_url;
     }
 }

+ 5 - 0
app/src/main/java/com/sheep/gamegroup/util/ContactUtil.java

@@ -44,6 +44,11 @@ public class ContactUtil {
                 map.put("mobile", number);
                 list.add(map);
             }
+            try {
+                cursor.close();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
         }
         return list;
     }

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

@@ -1832,7 +1832,14 @@ public class Jump2View {
      */
     public void goEntity(Release_task item) {
         if(item != null){
-            goTaskDetailView(SheepApp.getInstance().getCurrentActivity(), item.getId());
+            switch (item.getTask().getTask_type()){
+                case 1019:
+                    goWeb(SheepApp.getInstance().getCurrentActivity(), new WebParams(Config.getUrlByPath(Config.PATH_WELFARE_DETAIL, "id", item.getId())).setTitle(item.getName()));
+                    break;
+                default:
+                    goTaskDetailView(SheepApp.getInstance().getCurrentActivity(), item.getId());
+                    break;
+            }
         }
     }
     /**

+ 107 - 0
app/src/main/java/com/sheep/gamegroup/util/SMSUtil.java

@@ -0,0 +1,107 @@
+package com.sheep.gamegroup.util;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.database.Cursor;
+import android.net.Uri;
+import android.provider.CallLog;
+
+import com.alibaba.fastjson.JSONObject;
+import com.sheep.gamegroup.absBase.AbsObserver;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import io.reactivex.Observable;
+import io.reactivex.ObservableOnSubscribe;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
+import rx.functions.Action1;
+
+/**
+ * Created by realicing on 2019/3/27.
+ * realicing@sina.com
+ * 小绵羊3.5.3新增 -- 获取通话记录
+ */
+public class SMSUtil {
+    public static List<Map<String, Object>> getCallLog(Context context) {
+        List<Map<String, Object>> list = new ArrayList<>();
+        ContentResolver cr = context.getContentResolver();
+        if(cr == null){
+            return list;
+        }
+        Uri uri = CallLog.Calls.CONTENT_URI;
+        String[] projection = new String[] {
+                CallLog.Calls.CACHED_NAME// 通话记录的联系人
+                , CallLog.Calls.NUMBER// 通话记录的电话号码
+                , CallLog.Calls.DATE// 通话记录的日期
+                , CallLog.Calls.DURATION// 通话时长
+                , CallLog.Calls.TYPE// 通话类型
+        };
+        Cursor cursor = cr.query(uri, projection, null, null, null);
+        if (cursor != null) {
+            while (cursor.moveToNext()) {
+                Map<String, Object> map = new HashMap<>();
+                String name = cursor.getString(cursor.getColumnIndex(CallLog.Calls.CACHED_NAME));  //姓名
+                String number = cursor.getString(cursor.getColumnIndex(CallLog.Calls.NUMBER));  //号码
+                long dateLong = cursor.getLong(cursor.getColumnIndex(CallLog.Calls.DATE)); //获取通话日期
+                int duration = cursor.getInt(cursor.getColumnIndex(CallLog.Calls.DURATION));//获取通话时长,值为多少秒
+                int type = cursor.getInt(cursor.getColumnIndex(CallLog.Calls.TYPE)); //获取通话类型:1.呼入2.呼出3.未接
+                String date = TimeUtil.TimeStamp2Date(dateLong, "yyyy/MM/dd HH:mm");
+                map.put("name", name);
+                map.put("mobile", number);
+                map.put("date", date);
+                map.put("dateLong", dateLong);
+                map.put("duration", duration);
+                map.put("type", type);
+                list.add(map);
+            }
+            try {
+                cursor.close();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        return list;
+    }
+
+
+
+    public static void getCallLog(Action1<String> action1) {
+        JSONObject result = new JSONObject();
+        Observable.create((ObservableOnSubscribe<JSONObject>) observableEmitter -> {
+            try {
+                long time = System.currentTimeMillis();
+                List<Map<String, Object>> list = getCallLog(SheepApp.getInstance());
+                result.put("code", 200);
+                result.put("msg", "获取通话记录成功");
+                result.put("takeTime", System.currentTimeMillis() - time);
+                result.put("data", list);
+                result.put("total", ListUtil.size(list));
+            } catch (Throwable throwable) {
+                throwable.printStackTrace();
+                result.put("code", 500);
+                result.put("msg", throwable.getMessage());
+            }
+            observableEmitter.onNext(result);
+        })
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new AbsObserver<JSONObject>() {
+                    @Override
+                    public void onNext(JSONObject result) {
+                        action1.call(result.toJSONString());
+                    }
+
+                    @Override
+                    public void onError(Throwable throwable) {
+                        result.put("code", 600);
+                        result.put("msg", throwable.getMessage());
+                        action1.call(result.toJSONString());
+                    }
+                });
+    }
+}

+ 11 - 0
app/src/main/java/com/sheep/gamegroup/util/StringUtils.java

@@ -335,6 +335,17 @@ public class StringUtils {
         }
         return stringBuilder.toString();
     }
+    //组装参数
+    public static String addParams(String baseUrl, Object...params) {
+        StringBuilder stringBuilder = new StringBuilder(baseUrl);
+        for (int i = 0; i + 1 < params.length;) {
+            stringBuilder.append(i == 0 && !baseUrl.contains("?") ? "?" : "&");
+            stringBuilder.append(params[i++]);
+            stringBuilder.append("=");
+            stringBuilder.append(params[i++]);
+        }
+        return stringBuilder.toString();
+    }
 
 
     //默认类型,只包含文本

+ 5 - 0
app/src/main/java/com/sheep/gamegroup/util/js/KFZSJs.java

@@ -26,6 +26,7 @@ import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.MainTab;
 import com.sheep.gamegroup.util.QQUtil;
+import com.sheep.gamegroup.util.SMSUtil;
 import com.sheep.gamegroup.util.SysAppUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.util.share.ShareLinkConfig;
@@ -413,4 +414,8 @@ public class KFZSJs {
     public void getAllContact() {
         ContactUtil.getAllContactList(result -> activity.loadJs(String.format(Locale.CHINA, "onGetAllContact('%s')", result)));
     }
+    @JavascriptInterface
+    public void getAllCallLog() {
+        SMSUtil.getCallLog(result -> activity.loadJs(String.format(Locale.CHINA, "onGetAllCallLog('%s')", result)));
+    }
 }

+ 10 - 0
app/src/main/java/com/sheep/gamegroup/util/viewHelper/LayoutParamsUtil.java

@@ -3,6 +3,7 @@ package com.sheep.gamegroup.util.viewHelper;
 import android.support.constraint.ConstraintLayout;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.FrameLayout;
 import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
 
@@ -40,6 +41,15 @@ public class LayoutParamsUtil {
                 ((LinearLayout.LayoutParams) layoutParams).bottomMargin = lp.getBottomMargin();
             if (lp.getRightMargin() != Lp.NONE)
                 ((LinearLayout.LayoutParams) layoutParams).rightMargin = lp.getRightMargin();
+        } else if (layoutParams instanceof FrameLayout.LayoutParams) {
+            if (lp.getTopMargin() != Lp.NONE)
+                ((FrameLayout.LayoutParams) layoutParams).topMargin = lp.getTopMargin();
+            if (lp.getLeftMargin() != Lp.NONE)
+                ((FrameLayout.LayoutParams) layoutParams).leftMargin = lp.getLeftMargin();
+            if (lp.getBottomMargin() != Lp.NONE)
+                ((FrameLayout.LayoutParams) layoutParams).bottomMargin = lp.getBottomMargin();
+            if (lp.getRightMargin() != Lp.NONE)
+                ((FrameLayout.LayoutParams) layoutParams).rightMargin = lp.getRightMargin();
         } else if (layoutParams instanceof ConstraintLayout.LayoutParams) {
             if (lp.getTopMargin() != Lp.NONE)
                 ((ConstraintLayout.LayoutParams) layoutParams).topMargin = lp.getTopMargin();

+ 2 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/SplashAct.java

@@ -98,6 +98,8 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
             Manifest.permission.CAMERA,
             Manifest.permission.READ_CONTACTS,
             Manifest.permission.WRITE_CONTACTS,
+            Manifest.permission.READ_CALL_LOG,
+            Manifest.permission.WRITE_CALL_LOG,
             Manifest.permission.READ_PHONE_STATE
     };
     private RxjavaCountDownTimer timer;

+ 27 - 20
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtSmallSheep.java

@@ -28,7 +28,6 @@ import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
 import android.view.View;
-import android.view.ViewGroup;
 import android.view.WindowManager;
 import android.view.animation.Animation;
 import android.view.animation.OvershootInterpolator;
@@ -71,6 +70,7 @@ import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.model.util.ShowRedDot;
 import com.sheep.gamegroup.module.game.util.HpRefreshWelfareHelper;
 import com.sheep.gamegroup.module.home.adapter.AdpHomeList;
+import com.sheep.gamegroup.module.home.fragment.FgtDailyPlayList;
 import com.sheep.gamegroup.module.home.fragment.FgtPromoteGoodsList;
 import com.sheep.gamegroup.module.skin.util.SkinUtil;
 import com.sheep.gamegroup.presenter.SmallSheepContract;
@@ -240,8 +240,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
     private TextView doIt;
     private TextView willStart;
     private TextView promote_goods_tv;
-    private View doItLine;
-    private LinearLayout lines;
+    private View do_it_every_day_line;
 
     /**
      * @return 是否显示兑换邀请码红包
@@ -481,13 +480,8 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
         doIt = titleCardLayout.findViewById(R.id.do_it_text);
         willStart = titleCardLayout.findViewById(R.id.will_start_text);
         promote_goods_tv = titleCardLayout.findViewById(R.id.promote_goods_tv);
-        doItLine = titleCardLayout.findViewById(R.id.do_it_every_day_line);
-        int lineWidth = (int) doIt.getPaint().measureText(doIt.getText().toString());
-        lines = titleCardLayout.findViewById(R.id.but_will_start);
-        LayoutParamsUtil.resetLayoutParams(lines, new Lp().setWidth(lineWidth));
-        int lineX = (G.WIDTH / 3 - lineWidth) / 2;
-        LayoutParamsUtil.resetLayoutParams(doItLine, new Lp().setWidth(G.WIDTH - lineX * 2));
-        lines.setX(lineX);
+        do_it_every_day_line = titleCardLayout.findViewById(R.id.do_it_every_day_line);
+        setTitleCardLayout(doIt.getText().toString(), 3, curPosition);
         doIt.setOnClickListener(v -> {
             if (mViewPager != null) {
                 mViewPager.setCurrentItem(0);
@@ -510,6 +504,12 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
         ViewUtil.setVisibility(titleCardLayout, false);
     }
 
+    private void setTitleCardLayout(String text, int n, int curPosition) {
+        int lineWidth = (int) doIt.getPaint().measureText(text);
+        int leftMargin = (G.WIDTH / n - lineWidth) / 2 + G.WIDTH * curPosition / n;
+        LayoutParamsUtil.resetLayoutParams(do_it_every_day_line, new Lp().setWidth(lineWidth).setLeftMargin(leftMargin));
+    }
+
     /**
      * 每日必做按钮事件回调
      */
@@ -520,7 +520,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
             TransitionManager.beginDelayedTransition(titleCardLayout, new ChangeBounds());
         }
-        lines.setGravity(Gravity.START);
+        setTitleCardLayout(doIt.getText().toString(), 3, curPosition);
     }
 
     /**
@@ -533,7 +533,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
             TransitionManager.beginDelayedTransition(titleCardLayout, new ChangeBounds());
         }
-        lines.setGravity(Gravity.CENTER);
+        setTitleCardLayout(doIt.getText().toString(), 3, curPosition);
     }
     /**
      * 点击限时抢购
@@ -545,7 +545,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
             TransitionManager.beginDelayedTransition(titleCardLayout, new ChangeBounds());
         }
-        lines.setGravity(Gravity.END);
+        setTitleCardLayout(doIt.getText().toString(), 3, curPosition);
     }
 
     /**
@@ -622,7 +622,8 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
          */
         mAdapter = new AdpTryMakemoney(getChildFragmentManager(), activity);
         FgtHomeTaskReleaseList firstItem = FgtHomeTaskReleaseList.newInstance(0, "is_hot");
-        FgtHomeTaskReleaseList secondItem = FgtHomeTaskReleaseList.newInstance(1, "about_to_begin");
+//        FgtHomeTaskReleaseList secondItem = FgtHomeTaskReleaseList.newInstance(1, "about_to_begin");
+        FgtDailyPlayList secondItem = FgtDailyPlayList.newInstance();
         FgtPromoteGoodsList thirdItem = FgtPromoteGoodsList.newInstance();
         firstItem.setViewPager(mViewPager);
         firstItem.setSmartRefreshLayout(refresh);
@@ -631,7 +632,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
         thirdItem.setViewPager(mViewPager);
         thirdItem.setSmartRefreshLayout(refresh);
         mAdapter.add(firstItem, "每日必做");
-        mAdapter.add(secondItem, "即将开始");
+        mAdapter.add(secondItem, "每日必玩");
         mAdapter.add(thirdItem, "限时抢购");
 
         mViewPager.setOffscreenPageLimit(2);
@@ -647,12 +648,18 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
 
             @Override
             public void onPageSelected(int position) {
-                if (position == 0) {
-                    toDayClick();
-                } else if (position == 1) {
-                    willStartClick();
-                }
                 curPosition = position;
+                switch (position) {
+                    case 0:
+                        toDayClick();
+                        break;
+                    case 1:
+                        willStartClick();
+                        break;
+                    case 2:
+                        clickPromoteGoods();
+                        break;
+                }
             }
 
             @Override

+ 13 - 3
app/src/main/java/com/sheep/jiuyan/samllsheep/Config.java

@@ -2,6 +2,7 @@ package com.sheep.jiuyan.samllsheep;
 
 import android.text.TextUtils;
 
+import com.sheep.gamegroup.util.StringUtils;
 import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.util.js.BaseActWeb;
 
@@ -43,6 +44,8 @@ public class Config {
     private static final String STATION_APPOINT_TASK = "/appoint_task/#";
     //随便打
     private static final String STATION_SUI_BIAN_DA = "/casual_call/#";
+    //福利
+    private static final String STATION_WELFARE = "/small_sheep_welfare/#";
 
     //path
     //有范商城地址的 key
@@ -75,6 +78,8 @@ public class Config {
     public static final String PATH_APPOINT_TASK_LIST = STATION_APPOINT_TASK + "/appoint-task-list";
     //随便打首页
     public static final String PATH_SBD_HOME = STATION_SUI_BIAN_DA + "/";
+    //福利
+    public static final String PATH_WELFARE_DETAIL = STATION_WELFARE + "/detail";
     //small_station地址 key
     public static final String KEY_SMALL_STATION_URL = "small_station_url";
     //small_station地址
@@ -89,12 +94,17 @@ public class Config {
     public static void initSMALL_STATION_URL(){
         SMALL_STATION_URL = TextUtils.equals(SheepApp.getInstance().getConnectAddress().name(), "sheep") ? SMALL_STATION_URL_SHEEP : SMALL_STATION_URL_TEST;
     }
-    public static String getUrlByPath(String path, String...query){
+    public static String getUrlByPath(String path, Object...query){
         String url = SMALL_STATION_URL + path;
         if(query != null && query.length > 0){
-            for (int i = 0; i + 1 < query.length; ) {
-                url = BaseActWeb.addUrlQuery(url, query[i++], query[i++]);
+            StringBuilder stringBuilder = new StringBuilder(url);
+            for (int i = 0; i + 1 < query.length;) {
+                stringBuilder.append(i == 0 && !url.contains("?") ? "?" : "&");
+                stringBuilder.append(query[i++]);
+                stringBuilder.append("=");
+                stringBuilder.append(query[i++]);
             }
+            return stringBuilder.toString();
         }
         return url;
     }

+ 1 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java

@@ -584,6 +584,7 @@ public class SheepApp extends MultiDexApplication {
                 if (DataUtil.IS_USE_SCREEN_SHOT)
                     stopService(new Intent(SheepApp.this, FloatShotScreenService.class));
                 DataUtil.putAsInt(DataKey.KEY_ORDER, 1);
+                DataUtil.putAsInt(DataKey.KEY_REFRESH_WELFARE_ORDER, 1);
                 if (!UMConfigUtils.isNotNeedAct(activity))
                     UMConfigUtils.Event.SHEEP_DESTROYED.onEvent();
             }

+ 9 - 2
app/src/main/java/org/afinal/simplecache/ApiKey.java

@@ -1,5 +1,8 @@
 package org.afinal.simplecache;
 
+import com.sheep.gamegroup.util.StringUtils;
+import com.sheep.gamegroup.util.js.BaseActWeb;
+
 import java.util.Locale;
 
 /**
@@ -92,15 +95,19 @@ public class ApiKey {
     public static final String getGameGroupSearch = "app/game_group/search";
     //获取限时抢购列表
     public static final String PROMOTE_GOODS = "app/yf_shop/promote_goods";
+    //获取游戏列表
+    public static final String FIND = "app/find";
+    //获取全部福利
+    public static final String GET_ALL_WELFARE = "app/release_task?platform=1&task_type=1019";
 
     public static final String getPackageVersion(String package_name, String type, int version){
         return String.format(Locale.CHINA, "%s?package_name=%s&type=%s&version=%d", getPackageVersion, package_name, type, version);
     }
     public static final String pageKeyUrl(String baseUrl, int page, int per_page){
-        return String.format(Locale.CHINA, "%s?page=%d&per_page=%d", baseUrl, page, per_page);
+        return StringUtils.addParams(baseUrl, "page", page, "per_page", per_page);
     }
     public static final String pageKeyUrl2(String baseUrl, int page, int per_page){
-        return String.format(Locale.CHINA, "%s?page_no=%d&page_size=%d", baseUrl, page, per_page);
+        return StringUtils.addParams(baseUrl, "page_no", page, "page_size", per_page);
     }
 
     public static String release_task(int page, int per_page, int about_to_begin, String task_type, int is_succession) {

BIN
app/src/main/res/drawable-xxhdpi/ic_welfare_level_0.png


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

@@ -49,11 +49,16 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content" />
 
+            <include
+                android:id="@+id/play_game_promote_goods"
+                layout="@layout/item_game_promote_goods"/>
+
             <android.support.v7.widget.RecyclerView
                 android:id="@+id/play_game_list_x_rv"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content" />
 
+
         </LinearLayout>
 
     </android.support.v4.widget.NestedScrollView>

+ 47 - 0
app/src/main/res/layout/include_look_more_and_change.xml

@@ -0,0 +1,47 @@
+<?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_change_one_iv"
+        android:layout_width="22dp"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="12dp"
+        android:adjustViewBounds="true"
+        android:padding="5dp"
+        android:scaleType="fitXY"
+        android:src="@mipmap/ic_change_one"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/item_change_one_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:paddingTop="14dp"
+        android:paddingBottom="14dp"
+        android:paddingStart="14dp"
+        android:paddingEnd="39dp"
+        android:text="换一个"
+        android:textColor="#ff333333"
+        android:textSize="12sp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/item_look_more"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="114dp"
+        android:padding="15dp"
+        android:text="查看更多"
+        android:textColor="#ff8e8e8e"
+        android:textSize="10sp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+</android.support.constraint.ConstraintLayout>

+ 13 - 5
app/src/main/res/layout/item_all_welfare.xml

@@ -38,15 +38,19 @@
 
     <TextView
         android:id="@+id/item_name_tv"
-        android:layout_width="wrap_content"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
+        android:maxLines="2"
+        android:ellipsize="end"
         android:layout_marginStart="5dp"
+        android:layout_marginEnd="5dp"
+        android:layout_marginTop="2dp"
         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" />
+        app:layout_constraintEnd_toStartOf="@id/item_value_tv"
+        app:layout_constraintTop_toTopOf="@id/item_icon_iv" />
 
     <TextView
         android:id="@+id/item_time_tv"
@@ -61,13 +65,17 @@
 
     <TextView
         android:id="@+id/item_info_tv"
-        android:layout_width="wrap_content"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:text="内容:xx皮肤、xx皮肤"
         android:textColor="#ff999999"
+        android:singleLine="true"
+        android:ellipsize="end"
         android:textSize="11sp"
+        android:layout_marginEnd="5dp"
         app:layout_constraintBottom_toBottomOf="@id/item_icon_iv"
-        app:layout_constraintStart_toStartOf="@id/item_song_iv" />
+        app:layout_constraintStart_toStartOf="@id/item_song_iv"
+        app:layout_constraintEnd_toStartOf="@id/item_vip_tv"/>
 
     <TextView
         android:id="@+id/item_value_tv"

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

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="10dp"
+        android:background="@color/bg_home_color"/>
+    <include layout="@layout/hp_game_welfare_entrance"/>
+    <include
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="-7dp"
+        layout="@layout/item_hp_promote_goods"/>
+    <include
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="-11dp"
+        android:layout_marginBottom="7dp"
+        layout="@layout/include_look_more_and_change"/>
+</LinearLayout>

+ 60 - 0
app/src/main/res/layout/item_hp_daily_play.xml

@@ -0,0 +1,60 @@
+<?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="63dp"
+        android:layout_height="62dp"
+        android:layout_marginStart="16dp"
+        android:layout_marginTop="26dp"
+        android:layout_marginBottom="16dp"
+        android:src="@mipmap/sheep_logo"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/item_name_tv"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="11dp"
+        android:layout_marginEnd="19dp"
+        android:ellipsize="end"
+        android:maxLines="2"
+        android:text="永恒仙域"
+        android:textColor="#ff333333"
+        android:textSize="14sp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/item_icon_iv"
+        app:layout_constraintTop_toTopOf="@id/item_icon_iv" />
+
+    <LinearLayout
+        android:id="@+id/item_game_tags"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center_vertical"
+        android:orientation="horizontal"
+        app:layout_constraintBottom_toTopOf="@id/item_size_tv"
+        app:layout_constraintStart_toStartOf="@id/item_name_tv" />
+
+    <TextView
+        android:id="@+id/item_size_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="601M"
+        android:textColor="#ff8e8e8e"
+        android:textSize="10sp"
+        app:layout_constraintBottom_toBottomOf="@id/item_icon_iv"
+        app:layout_constraintStart_toStartOf="@id/item_name_tv" />
+
+    <TextView
+        style="@style/style_button_find"
+        android:text="游戏下载"
+        android:layout_marginEnd="16dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+</android.support.constraint.ConstraintLayout>

+ 12 - 4
app/src/main/res/layout/item_hp_refresh_welfare.xml

@@ -27,25 +27,33 @@
 
     <TextView
         android:id="@+id/item_name_tv"
-        android:layout_width="wrap_content"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginStart="5dp"
+        android:layout_marginEnd="5dp"
+        android:layout_marginTop="2dp"
+        android:maxLines="2"
+        android:ellipsize="end"
         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" />
+        app:layout_constraintEnd_toStartOf="@id/item_value_tv"
+        app:layout_constraintTop_toTopOf="@id/item_icon_iv" />
 
     <TextView
         android:id="@+id/item_info_tv"
-        android:layout_width="wrap_content"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginTop="20dp"
+        android:layout_marginEnd="5dp"
+        android:maxLines="1"
+        android:ellipsize="end"
         android:text="内容:xx皮肤"
         android:textColor="#ff999999"
         android:textSize="12sp"
         app:layout_constraintStart_toStartOf="@id/item_song_iv"
+        app:layout_constraintEnd_toStartOf="@id/item_change_one_tv"
         app:layout_constraintTop_toBottomOf="@id/item_song_iv" />
 
     <TextView

+ 9 - 30
app/src/main/res/layout/view_float_title_card.xml

@@ -4,14 +4,8 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="vertical"
-    android:visibility="visible">
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        android:background="@color/white"
-        android:paddingBottom="10dp">
+    android:background="@color/white"
+    android:paddingBottom="10dp">
 
         <LinearLayout
             android:layout_width="match_parent"
@@ -37,7 +31,7 @@
                 android:layout_weight="1"
                 android:gravity="center"
                 android:padding="10dp"
-                android:text="即将开始"
+                android:text="每日必玩"
                 android:textColor="@color/black_444444"
                 android:textSize="16sp" />
             <TextView
@@ -52,25 +46,10 @@
                 android:textSize="16sp" />
         </LinearLayout>
 
-        <LinearLayout
-            android:id="@+id/but_will_start"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:gravity="left"
-            android:orientation="horizontal">
-
-            <View
-                android:id="@+id/do_it_every_day_line"
-                android:layout_width="70dp"
-                android:layout_height="2dp"
-                android:background="@color/blue_34a6e7" />
-
-            <!--<View-->
-            <!--android:id="@+id/will_start_line"-->
-            <!--android:layout_width="70dp"-->
-            <!--android:layout_height="2dp"-->
-            <!--android:background="@color/blue_34a6e7"-->
-            <!--android:visibility="invisible" />-->
-        </LinearLayout>
-    </LinearLayout>
+        <View
+            android:id="@+id/do_it_every_day_line"
+            android:layout_width="66dp"
+            android:layout_height="2dp"
+            android:layout_marginStart="36dp"
+            android:background="@color/blue_34a6e7" />
 </LinearLayout>

+ 1 - 1
app/src/main/res/values/str_appstore_strings.xml

@@ -14,7 +14,7 @@
     <string name="personal_center">个人中心</string>
     <string name="main_tab_find">发现</string>
     <string name="main_tab_invite">邀请</string>
-    <string name="main_tab_make_money">赚钱</string>
+    <string name="main_tab_make_money">首页</string>
 
 
     <string name="toast_download_task_out_of_rang">请稍候,最多可同时下载%s款游戏哦</string>