Просмотр исходного кода

Merge remote-tracking branch 'origin/sheep_develop' into sheep_develop

# Conflicts:
#	app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java
yuanshenglan лет назад: 7
Родитель
Сommit
3e136ec1e7
50 измененных файлов с 944 добавлено и 273 удалено
  1. 0 1
      app/src/main/AndroidManifest.xml
  2. 2 0
      app/src/main/java/com/kfzs/duanduan/event/EventTypes.java
  3. 1 12
      app/src/main/java/com/kfzs/duanduan/fragment/FgtFindChild.java
  4. 35 3
      app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java
  5. 5 0
      app/src/main/java/com/kfzs/duanduan/mine/GiftpackListAdapter.java
  6. 0 2
      app/src/main/java/com/kfzs/duanduan/react/TabsHelper.java
  7. 11 5
      app/src/main/java/com/sheep/gamegroup/model/entity/DownloadWelfare.java
  8. 32 0
      app/src/main/java/com/sheep/gamegroup/model/entity/GameEntity.java
  9. 11 0
      app/src/main/java/com/sheep/gamegroup/model/entity/GiftBagApp.java
  10. 10 0
      app/src/main/java/com/sheep/gamegroup/model/entity/PlayGameEntity.java
  11. 19 3
      app/src/main/java/com/sheep/gamegroup/model/entity/TaskReleaseEty.java
  12. 21 0
      app/src/main/java/com/sheep/gamegroup/model/entity/VoucherRecord.java
  13. 12 2
      app/src/main/java/com/sheep/gamegroup/model/entity/VoucherUseLog.java
  14. 50 0
      app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java
  15. 19 34
      app/src/main/java/com/sheep/gamegroup/util/DataUtil.java
  16. 2 2
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  17. 8 6
      app/src/main/java/com/sheep/gamegroup/util/SysAppUtil.java
  18. 71 9
      app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java
  19. 0 1
      app/src/main/java/com/sheep/gamegroup/view/activity/ActFindGame.java
  20. 0 1
      app/src/main/java/com/sheep/gamegroup/view/activity/ActFindInformation.java
  21. 40 28
      app/src/main/java/com/sheep/gamegroup/view/activity/ActPlayGameDetail.java
  22. 7 6
      app/src/main/java/com/sheep/gamegroup/view/activity/SplashAct.java
  23. 0 1
      app/src/main/java/com/sheep/gamegroup/view/activity/TaskDetailAct.java
  24. 2 2
      app/src/main/java/com/sheep/gamegroup/view/adapter/GiftCenterAdapter.java
  25. 24 2
      app/src/main/java/com/sheep/gamegroup/view/adapter/PlayGameItemAdapter.java
  26. 5 3
      app/src/main/java/com/sheep/gamegroup/view/adapter/WelfareAdapter.java
  27. 1 15
      app/src/main/java/com/sheep/gamegroup/view/fragment/BaseListFragment.java
  28. 6 1
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGiftCenter.java
  29. 38 21
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtMyGame.java
  30. 26 5
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtPlaGameGift.java
  31. 17 13
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtPlayGame.java
  32. 52 1
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtPlayGameDetail.java
  33. 50 11
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtTryMakeMoney.java
  34. 10 0
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtWelfareCenter.java
  35. 1 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java
  36. 1 0
      app/src/main/java/org/afinal/simplecache/ApiKey.java
  37. 8 8
      app/src/main/res/drawable/shape_blue_stroke_rectangle_no_lb.xml
  38. 11 0
      app/src/main/res/drawable/shape_yellow_stroke_rectangle_no_lb.xml
  39. 55 16
      app/src/main/res/layout/act_play_game_detail_layout.xml
  40. 217 0
      app/src/main/res/layout/act_play_game_dtail.xml
  41. 1 1
      app/src/main/res/layout/fgt_personalcenter_item_center_one.xml
  42. 1 1
      app/src/main/res/layout/fgt_play_game.xml
  43. 7 11
      app/src/main/res/layout/fgt_try_makemoney_layout.xml
  44. 4 1
      app/src/main/res/layout/fgt_welfare_center.xml
  45. 11 0
      app/src/main/res/layout/game_tag_textview.xml
  46. 1 1
      app/src/main/res/layout/item_download_welfare.xml
  47. 31 7
      app/src/main/res/layout/item_play_game_detail.xml
  48. 2 37
      app/src/main/res/layout/play_game_vertical_list_item.xml
  49. 1 0
      app/src/main/res/layout/user_label.xml
  50. 5 0
      app/src/main/res/values/common.xml

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

@@ -352,7 +352,6 @@
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActWeb"
-            android:hardwareAccelerated="false"
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActMyMoney"

+ 2 - 0
app/src/main/java/com/kfzs/duanduan/event/EventTypes.java

@@ -42,6 +42,8 @@ public enum EventTypes {
 
     REFRESH_XIAOMI_GAME_LIST,//刷新界面
     FGT_SHEEP_REFRESH_H , //刷新fgtSmallSheep高度
+    FGT_SHEEP_FOOT_VIEW_CALL_BACK , //FgtSmallSheep中ViewPager内容中的任务列表XRecyclerView的FootView刷新回调
+    FGT_SHEEP_SET_BOTTOM_LINE , //设置底线内容
     FGT_SHEEP_SHOW_NEW_USER_HONG_BAO , //显示红包
     REFRESH_AUDITACTIVITY_DATA,//审核数据刷新
     FGT_PLAYGAME_REFRESH_H , //刷新玩转游戏高度

+ 1 - 12
app/src/main/java/com/kfzs/duanduan/fragment/FgtFindChild.java

@@ -106,16 +106,8 @@ public class FgtFindChild extends BaseCompatFragment {
     View check_net_ll;
     @BindView(R.id.view_list)
     XRecyclerView view_list;
-    View bottomLine;
     private void initView(){
         title.setVisibility(View.GONE);
-//        refresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
-//            @Override
-//            public void onRefresh() {
-//                refreshData();
-//                refresh.setRefreshing(false);
-//            }
-//        });
         view_list.setLoadingListener(new XRecyclerView.LoadingListener() {
             @Override
             public void onRefresh() {
@@ -132,7 +124,7 @@ public class FgtFindChild extends BaseCompatFragment {
                 }
             }
         });
-        bottomLine = ViewUtil.setBottomLine(view_list);
+        ViewUtil.setBottomLine(view_list);
         view_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
         view_list.setAdapter(new AdbCommonRecycler<FindItem>(SheepApp.getInstance(), list){
 
@@ -346,8 +338,6 @@ public class FgtFindChild extends BaseCompatFragment {
 
     private void notifyDataSetChanged(){
         CommonUtil.getInstance().updateEmptyView(empty_view, list.isEmpty());
-        bottomLine.setVisibility(list.isEmpty() ? View.INVISIBLE : View.VISIBLE);
-//        refresh.setRefreshing(false);
         if(page == 1){
             view_list.refreshComplete();
         } else {
@@ -497,6 +487,5 @@ public class FgtFindChild extends BaseCompatFragment {
     public void onDestroy() {
         super.onDestroy();
         EventBus.getDefault().unregister(this);
-        Aria.download(this).unRegister();
     }
 }

+ 35 - 3
app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java

@@ -218,11 +218,14 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
     public static final int WHAT_LOAD_USER_INFO = 0;//加载用户信息
     public static final int WHAT_LOAD_RUN_TASK = 1;//加载正在进行的任务列表
     public static final int WHAT_UPDATE_VP_HEIGHT = 2;//刷新viewpager高度
+    public static final int WHAT_UPDATE_BOTTOM_LINE = 3;//刷新底线(双击我回到顶部)
+    public static final int WHAT_UPDATE__FOOT_VIEW_CALL_BACK = 4;//刷新发布任务列表的加载更多的状态回调
     public static final int WHAT_TRY_SHOW_HB = 7;//尝试显示红包
     public Handler mHandler = new Handler(Looper.getMainLooper()) {
         @Override
         public void handleMessage(Message msg) {
             super.handleMessage(msg);
+            FgtTryMakeMoney item;
             switch (msg.what) {
                 case WHAT_LOAD_USER_INFO:
                     loadUserInfo();
@@ -245,8 +248,8 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
                     tryMakeMoneyAdp.notifyDataSetChanged();
                     checkAndInitView();
                     break;
-                case WHAT_UPDATE_VP_HEIGHT:
-                    FgtTryMakeMoney item = (FgtTryMakeMoney) adpViewPagerDetail.getItem(curPosition);
+                case WHAT_UPDATE_VP_HEIGHT://刷新ViewPager高度
+                    item = (FgtTryMakeMoney) adpViewPagerDetail.getItem(curPosition);
                     if (mViewPager == null || item == null) {
                         return;
                     }
@@ -255,6 +258,26 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
                     params.height = count == 0 ? G.HEIGHT / 2 : (count * getResources().getDimensionPixelSize(R.dimen.content_padding_96) + getResources().getDimensionPixelSize(R.dimen.content_padding));
                     mViewPager.setLayoutParams(params);
                     break;
+                case WHAT_UPDATE__FOOT_VIEW_CALL_BACK://发布任务列表的加载更多的回调
+                    String obj = (String) msg.obj;
+                    switch (obj){
+                        case "onLoadingMore":
+                            bottom_line_text.setText("羊羊努力加载中...");
+                            break;
+                        case "onLoadMoreComplete":
+                            bottom_line_text.setText("上拉下载更多,双击我回到顶部");
+                            break;
+                        case "onSetNoMore":
+                            break;
+                    }
+                    break;
+                case WHAT_UPDATE_BOTTOM_LINE://刷新底线
+                    item = (FgtTryMakeMoney) adpViewPagerDetail.getItem(curPosition);
+                    if (mViewPager == null || item == null) {
+                        return;
+                    }
+                    bottom_line_text.setText(item.isNoMore() ?"我是有底线的,双击我回到顶部" : "双击我回到顶部");
+                    break;
                 case WHAT_TRY_SHOW_HB:
                     isShowRedPackages(activity);
                     break;
@@ -512,7 +535,7 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
         //每次进入主页都刷新一下url配置信息
         CommonUtil.getInstance().initUrlConfigByNet(null, null);
         isShowRedPackage();
-        bottom_line_text.setText("我是有底线的,双击我回到顶部");
+        bottom_line_text.setText("双击我回到顶部");
     }
 
 
@@ -1185,6 +1208,15 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
             case FGT_SHEEP_REFRESH_H:
                 mHandler.sendEmptyMessage(WHAT_UPDATE_VP_HEIGHT);
                 break;
+            case FGT_SHEEP_FOOT_VIEW_CALL_BACK:
+                Message msg = Message.obtain();
+                msg.what = WHAT_UPDATE__FOOT_VIEW_CALL_BACK;
+                msg.obj = event.getData();
+                mHandler.sendMessage(msg);
+                break;
+            case FGT_SHEEP_SET_BOTTOM_LINE:
+                mHandler.sendEmptyMessage(WHAT_UPDATE_BOTTOM_LINE);
+                break;
             case FGT_SHEEP_SHOW_NEW_USER_HONG_BAO:
                 mHandler.sendEmptyMessage(WHAT_TRY_SHOW_HB);
                 break;

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

@@ -27,6 +27,11 @@ public class GiftpackListAdapter extends FragmentPagerAdapter {
         mTitles.add(title);
     }
 
+    public void clearData(){
+        mListFragment.clear();
+        mTitles.clear();
+    }
+
     @Override
     public Fragment getItem(int position) {
         return (Fragment) mListFragment.get(position);

+ 0 - 2
app/src/main/java/com/kfzs/duanduan/react/TabsHelper.java

@@ -79,11 +79,9 @@ public class TabsHelper {
      */
     private void nativeBack() {
         if (System.currentTimeMillis() - mLastBackTime < 1000) {
-
             KFZSApp.getInstance().quit();
         } else {
             ToastBuilder.make(activity.getApplicationContext(), R.string.toast_double_click_exit_app, ToastBuilder.DEFAULT_TOAST_SINGLE);
-            SysAppUtil.isNewSmallSheep(true);//不知什么原因,之前在弹出弹窗广告时的设置为true可能没有效果,这里再保存一次吧
         }
         mLastBackTime = System.currentTimeMillis();
     }

+ 11 - 5
app/src/main/java/com/sheep/gamegroup/model/entity/DownloadWelfare.java

@@ -128,9 +128,14 @@ public class DownloadWelfare {
     }
 
 
-
-
-
+    @Override
+    public boolean equals(Object obj) {
+        try {
+            return obj instanceof DownloadWelfare && ((DownloadWelfare) obj).getLog().getId() == getLog().getId();
+        } catch (Exception e) {
+            return true;
+        }
+    }
 
     /**
      * 福利内容
@@ -138,7 +143,7 @@ public class DownloadWelfare {
      * @return
      */
     public String getGiftRatioText() {
-        return String.format(Locale.CHINA, "每充500抵%d", gift_ratio * 5);
+        return String.format(Locale.CHINA, "最低充%d,每充%d送%d", consume_amount, consume_amount, gift_ratio * consume_amount / 100);
     }
 
     /**
@@ -163,6 +168,7 @@ public class DownloadWelfare {
      * @return
      */
     public String getUseBalanceText() {
-        return String.format(Locale.CHINA, "已使用%d", this.Log != null ? this.Log.getTotalAssets() - this.Log.getBalance() : 0);
+        int use = this.Log != null ? this.Log.getTotalAssets() - this.Log.getBalance() : 0;
+        return use == 0 ? "未使用" : String.format(Locale.CHINA, "已使用%d", use);
     }
 }

+ 32 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/GameEntity.java

@@ -1,5 +1,9 @@
 package com.sheep.gamegroup.model.entity;
 
+import android.text.TextUtils;
+
+import com.kfzs.duanduan.utils.NumberFormatUtils;
+
 import java.io.Serializable;
 import java.util.List;
 
@@ -95,4 +99,32 @@ public class GameEntity implements Serializable{
     public void setStatus(int status) {
         this.status = status;
     }
+
+    /**
+     * 是有有礼包
+     * @return
+     */
+    public boolean isGift(){
+        return has_gift_bag != null && has_gift_bag.size() > 0;
+    }
+    /**
+     * 获取奖金的文本表示(这里保留两位有效数字,因为服务器可能返回这样的结果:0.6000000238418579)
+     * @return
+     */
+    public String getBonusText(){
+        if(release_task != null){
+            return NumberFormatUtils.retainMost2(release_task.getBonus());
+        }else {
+            return null;
+        }
+    }
+
+    /**
+     * 是否显示整个礼包和福利金额标签
+     * trur:不显示
+     */
+    public boolean isGiftAndBonus(){
+        return !isGift() && TextUtils.isEmpty(getBonusText());
+    }
+
 }

+ 11 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/GiftBagApp.java

@@ -40,4 +40,15 @@ public class GiftBagApp {
     public String getCode(){
         return this.code;
     }
+
+
+
+    @Override
+    public boolean equals(Object obj) {
+        try {
+            return obj instanceof GiftBagApp && ((GiftBagApp) obj).getGift_bag().getId() == getGift_bag().getId();
+        } catch (Exception e) {
+            return true;
+        }
+    }
 }

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

@@ -72,6 +72,16 @@ public class PlayGameEntity implements IDownload, Serializable {
     private long updated_at;//integer($int64)
     private String versions;//string版本号
 
+    private String game_tag;//游戏标签,可多选,逗号分割
+
+    public String getGame_tag() {
+        return game_tag;
+    }
+
+    public void setGame_tag(String game_tag) {
+        this.game_tag = game_tag;
+    }
+
     public int getId() {
         return Id;
     }

+ 19 - 3
app/src/main/java/com/sheep/gamegroup/model/entity/TaskReleaseEty.java

@@ -43,6 +43,7 @@ public class TaskReleaseEty implements Serializable{
     private boolean is_running;
     private String child_task_name;//
     private int demo_time;//试玩时长
+    private int consume_amount;//最低消费
     private int gift_ratio;//赠送比例,取值0-100
     private int user_task_status;//备注:和任务记录状态一样
     public int getDemo_time() {
@@ -184,7 +185,7 @@ public class TaskReleaseEty implements Serializable{
     }
 
     public String getRelease_num() {
-        return release_num;
+        return TextUtils.isEmpty(release_num)?"0":release_num;
     }
 
     public void setRelease_num(String release_num) {
@@ -272,6 +273,14 @@ public class TaskReleaseEty implements Serializable{
         this.user_task_status = user_task_status;
     }
 
+    public int getConsume_amount() {
+        return consume_amount;
+    }
+
+    public void setConsume_amount(int consume_amount) {
+        this.consume_amount = consume_amount;
+    }
+
     @Override
     public boolean equals(Object obj) {
         return obj instanceof TaskReleaseEty && ((TaskReleaseEty) obj).getId() == id;
@@ -316,7 +325,7 @@ public class TaskReleaseEty implements Serializable{
      * @return
      */
     public String getGiftRatioText() {
-        return String.format(Locale.CHINA, "每充500送%d", gift_ratio * 5);
+        return String.format(Locale.CHINA, "最低充%d,每充%d送%d", consume_amount, consume_amount, gift_ratio * consume_amount / 100);
     }
     /**
      * 剩余份数
@@ -325,7 +334,10 @@ public class TaskReleaseEty implements Serializable{
     public String getLastNumText() {
         return String.format(Locale.CHINA, "剩余%s份", last_num);
     }
-
+    public int getLastNum1Or0(){
+        int lastNum = NumberFormatUtils.parseInteger(last_num, 0);
+        return lastNum > 0 ? 1 : 0;
+    }
     public String getDateText() {
         long endTime = NumberFormatUtils.parseLong(deadline);
         if(endTime < 1000_000){
@@ -341,4 +353,8 @@ public class TaskReleaseEty implements Serializable{
     public boolean isTaskFinished() {
         return user_task_status == 3;
     }
+
+    public String getH5BonusText() {
+        return String.format(Locale.CHINA, "<font color='#ff2d4b' size='1'>¥</font><font color='#ff2d4b'>%s</font>", getBonusText());
+    }
 }

+ 21 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/VoucherRecord.java

@@ -3,6 +3,27 @@ package com.sheep.gamegroup.model.entity;
 /**
  * Created by realicing on 2018/9/4.
  * realicing@sina.com
+ * Amount	number($double)
+ * 金额
+ * <p>
+ * ConsumptionAmount	number($double)
+ * 消费金额
+ * <p>
+ * CreateTime	integer($int64)
+ * 记录时间
+ * <p>
+ * GameId	string
+ * 游戏id
+ * <p>
+ * Id	integer($int64)
+ * SurplusAmount	number($double)
+ * 消费金额
+ * <p>
+ * Type	integer($int32)
+ * 1:增加 2:扣除
+ * <p>
+ * UserId	integer($int64)
+ * 用户id
  */
 public class VoucherRecord {
 

+ 12 - 2
app/src/main/java/com/sheep/gamegroup/model/entity/VoucherUseLog.java

@@ -100,6 +100,16 @@ public class VoucherUseLog {
 
 
 
+    @Override
+    public boolean equals(Object obj) {
+        try {
+            return obj instanceof VoucherUseLog && ((VoucherUseLog) obj).getLog().getId() == getLog().getId();
+        } catch (Exception e) {
+            return true;
+        }
+    }
+
+
 
 
 
@@ -109,7 +119,7 @@ public class VoucherUseLog {
      * @return
      */
     public String getGiftRatioText() {
-        return String.format(Locale.CHINA, "每充500抵%d", gift_ratio * 5);
+        return String.format(Locale.CHINA, "充值%s元", this.Log != null ? NumberFormatUtils.retainMost2(this.Log.getConsumptionAmount()): "");
     }
 
     /**
@@ -131,6 +141,6 @@ public class VoucherUseLog {
      * @return
      */
     public String getConsumptionAmountText() {
-        return String.format(Locale.CHINA, "-%s", NumberFormatUtils.retainMost2(this.Log != null ? this.Log.getConsumptionAmount() : 0));
+        return String.format(Locale.CHINA, "-%s", this.Log != null ? NumberFormatUtils.retainMost2(this.Log.getAmount()) : "0");
     }
 }

+ 50 - 0
app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java

@@ -39,6 +39,7 @@ import com.sheep.gamegroup.model.entity.DialogConfig;
 import com.sheep.gamegroup.model.entity.Ext;
 import com.sheep.gamegroup.model.entity.FindApp;
 import com.sheep.gamegroup.model.entity.GameAccountEntity;
+import com.sheep.gamegroup.model.entity.GameEntity;
 import com.sheep.gamegroup.model.entity.HomeListEntity;
 import com.sheep.gamegroup.model.entity.NewbieTask;
 import com.sheep.gamegroup.model.entity.NewbieTaskRecord;
@@ -1170,6 +1171,33 @@ public class CommonUtil {
                     }
                 });
     }
+    //对---游戏任务中的领取奖励
+    public void receiveAward(final Context context, final TaskReleaseEty taskReleaseEty, final Action1<Integer> action1) {
+        SheepApp.getInstance()
+                .getNetComponent()
+                .getApiService()
+                .receive_award(taskReleaseEty.getAccepted_task_id())
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.mContext) {
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage.getErrorMsg());
+                    }
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        //这里领取了奖励,要刷新用户信息
+                        CommonUtil.getInstance().updateUserInfo(null);
+                        ViewUtil.showMsgDialog(context,
+                                "恭喜你获得" + taskReleaseEty.getBonusText() + "元奖励",
+                                "提示",
+                                true);
+                        if (action1 != null)
+                            action1.call(1);
+                    }
+                });
+    }
 
     private void giveUpTask(final Context context, final TaskReleaseEty taskReleaseEty, final Action1<Integer> action1) {
         SheepApp.getInstance().getNetComponent().getApiService().giveUpTask(taskReleaseEty.getAccepted_task_id())
@@ -2015,4 +2043,26 @@ public class CommonUtil {
                 break;
         }
     }
+
+    /**
+     *tag 标签绘制
+     R.drawable.shape_blue_stroke_rectangle_no_lb
+     @param i -1:不限制 否者限制tag 个数
+     */
+    public void paintLineaLayout(Context activity, GameEntity gameEntity, LinearLayout ll_game_tag, int i, int color, int drawable){
+        String game_tag = gameEntity.getApp().getGame_tag();
+        if(!TextUtils.isEmpty(game_tag)){
+            ArrayList<String> gameTagList = ListUtil.emptyList();
+            ListUtil.addAll(gameTagList, game_tag.split(","));
+            ll_game_tag.removeAllViews();
+            for(int j=0;j<gameTagList.size();j++){
+                if(i == -1 || i > j){
+                    ll_game_tag.addView(ViewUtil.newInstance().paintView(activity, gameTagList.get(j), color, drawable));
+                }else {
+                    return;
+                }
+            }
+        }
+
+    }
 }

+ 19 - 34
app/src/main/java/com/sheep/gamegroup/util/DataUtil.java

@@ -411,39 +411,24 @@ public class DataUtil {
                 });
 
     }
-//    //正在运行的任务
-//    List<TaskAcceptedEty> taskAcceptedEtyList = ListUtil.emptyList();
-//    public void addTaskAcceptedEtyList(List<TaskAcceptedEty> list) {
-//        isInitTaskAcceptedList = true;
-//        taskAcceptedEtyList.clear();
-//        taskAcceptedEtyList.addAll(list);
-//        LogUtil.println("DataUtil", "taskAcceptedEtyList", taskAcceptedEtyList.size());
-//    }
-//
-//    /**
-//     * 通过包名从内存中正在运行的任务列表中获取正在运行的任务
-//     * @param pacageName
-//     * @return
-//     */
-//    public TaskAcceptedEty getTaskAcceptedEtyFromPackageName(String pacageName) {
-//        if(!TextUtils.isEmpty(pacageName))
-//            for (TaskAcceptedEty taskAcceptedEty : taskAcceptedEtyList) {
-//                if(taskAcceptedEty != null && taskAcceptedEty.getRelease_task() != null && taskAcceptedEty.getRelease_task().getTask() != null
-//                        && TextUtils.equals(taskAcceptedEty.getRelease_task().getTask().getPackage_names(), pacageName)){
-//                    return taskAcceptedEty;
-//                }
-//            }
-//        return null;
-//    }
-//
-//    private boolean isInitTaskAcceptedList = false;
-//
-//    public boolean isInitTaskAcceptedList() {
-//        return isInitTaskAcceptedList;
-//    }
-//
-//    public List<TaskAcceptedEty> getTaskAcceptedEtyList() {
-//        return taskAcceptedEtyList;
-//    }
+
     //-----------------------------------------其它数据部分-----------------------------------------------------结束
+    //-----------------------------------------引导页中用到的是否为新版部分-----------------------------------------------------开始
+    private int versionType = 0;
+    public boolean notInitVersion() {
+        return versionType == 0;
+    }
+
+    public void setIsNewSmallSheep(boolean isNewSmallSheep) {
+        versionType = isNewSmallSheep ? 1 : 2;
+    }
+
+    public boolean isNewSmallSheep() {
+        return versionType == 1;
+    }
+    public void resetIsNewSmallSheep() {
+        versionType = 0;
+    }
+
+    //-----------------------------------------引导页中用到的是否为新版部分-----------------------------------------------------结束
 }

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

@@ -1182,7 +1182,7 @@ public class Jump2View {
     }
 
     public void gotoGuide(final Activity activity) {
-        if(SysAppUtil.isNewSmallSheep(false)){
+        if(SysAppUtil.isNewSmallSheep()){
             Intent intent = new Intent(activity, ActGuide.class);
             activity.startActivity(intent);
             activity.finish();
@@ -1202,7 +1202,7 @@ public class Jump2View {
     }
 
     public void tryShowHalfScreenAd(final Activity activity, final Container<Action1<Integer>> container) {
-        if(SysAppUtil.isNewSmallSheep(true)){//新版本只显示引导页面,不展示弹窗和开屏广告
+        if(SysAppUtil.isNewSmallSheep()){//新版本只显示引导页面,不展示弹窗和开屏广告
             return;
         }
         SheepApp.getInstance().getNetComponent().getApiService().getAdvertising(2)

+ 8 - 6
app/src/main/java/com/sheep/gamegroup/util/SysAppUtil.java

@@ -114,17 +114,19 @@ public class SysAppUtil {
 
     /**
      * 是否第一次运行新的小绵羊
-     * @param isSetNew 是否保存最新版本号,清除数据后保存的数据无效(注:有且只有最后一步操作要设置其为true)
      * @return
      */
-    public static boolean isNewSmallSheep(boolean isSetNew) {
-        int version_code = ForeverCacheUtil.getInstance().getVersionCode();
-        int cur_version_code = ApkUtils.getCurrentPkgVersionCode(SheepApp.getInstance());
-        if(isSetNew)
+    public static boolean isNewSmallSheep() {
+        if(DataUtil.getInstance().notInitVersion()){
+            int version_code = ForeverCacheUtil.getInstance().getVersionCode();
+            int cur_version_code = 3000005;//要想发新版本后让用户显示引导页面,就直接修改为一个更大的值
             ForeverCacheUtil.getInstance().saveVersionCode(cur_version_code);
-        return version_code < cur_version_code
+            boolean isNewSmallSheep = version_code != cur_version_code
 //                || BuildConfig.DEBUG
                 ;
+            DataUtil.getInstance().setIsNewSmallSheep(isNewSmallSheep);
+        }
+        return DataUtil.getInstance().isNewSmallSheep();
     }
 
     public static void clearCache(final Action1<Object> action1) {

+ 71 - 9
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -28,6 +28,7 @@ import android.text.Html;
 import android.text.TextUtils;
 import android.text.method.ScrollingMovementMethod;
 import android.util.DisplayMetrics;
+import android.util.TypedValue;
 import android.view.Display;
 import android.view.Gravity;
 import android.view.LayoutInflater;
@@ -379,7 +380,7 @@ public class ViewUtil {
                 if (clipData != null && clipData.getItemCount() > 0) {
                     // 从数据集中获取(粘贴)第一条文本数据
                     CharSequence codetext = clipData.getItemAt(0).getText();
-                    if (!TextUtils.isEmpty(codetext)) {
+                    if (!TextUtils.isEmpty(codetext)){
                         edInvitationCode.setText(codetext);
                     }
                 }
@@ -481,24 +482,61 @@ public class ViewUtil {
     }
 
     public static View setBottomLine(final XRecyclerView view_list) {
+        return setBottomLine(view_list, null);
+    }
+
+    public static View setBottomLine(final XRecyclerView view_list, final Action1<String> action1) {
         View view = LayoutInflater.from(SheepApp.getInstance()).inflate(R.layout.common_foot_view, null);
         view_list.setFootView(view, new CustomFooterViewCallBack() {
             @Override
             public void onLoadingMore(View yourFooterView) {
-                TextView bottom_line_text = yourFooterView.findViewById(R.id.bottom_line_text);
-                bottom_line_text.setText("羊羊努力加载中...");
+                if(action1 != null) {
+                    action1.call("onLoadingMore");
+                } else {
+                    TextView bottom_line_text = yourFooterView.findViewById(R.id.bottom_line_text);
+                    bottom_line_text.setText("羊羊努力加载中...");
+                }
             }
 
             @Override
             public void onLoadMoreComplete(View yourFooterView) {
-                TextView bottom_line_text = yourFooterView.findViewById(R.id.bottom_line_text);
-                bottom_line_text.setText("羊羊努力加载中...");
+                if(action1 != null) {
+                    action1.call("onLoadMoreComplete");
+                } else {
+                    TextView bottom_line_text = yourFooterView.findViewById(R.id.bottom_line_text);
+                    bottom_line_text.setText(canScrollToTop() ? "加载完成,点击我回到顶部" : "加载完成");
+                    yourFooterView.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            if(canScrollToTop())
+                                view_list.scrollToPosition(0);
+                        }
+                    });
+                }
             }
 
             @Override
             public void onSetNoMore(View yourFooterView, boolean noMore) {
-                TextView bottom_line_text = yourFooterView.findViewById(R.id.bottom_line_text);
-                bottom_line_text.setText("我是有底线的");
+                if(action1 != null) {
+                    action1.call("onSetNoMore");
+                } else {
+                    yourFooterView.setVisibility(isEmpty() ? View.GONE : View.VISIBLE);
+                    TextView bottom_line_text = yourFooterView.findViewById(R.id.bottom_line_text);
+                    bottom_line_text.setText(canScrollToTop() ? "我是有底线的,点击我回到顶部" : "我是有底线的");
+                    yourFooterView.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            if(canScrollToTop())
+                                view_list.scrollToPosition(0);
+                        }
+                    });
+                }
+            }
+            private boolean isEmpty(){
+                return view_list.getAdapter().getItemCount() == 0;
+            }
+            private boolean canScrollToTop(){
+                return view_list.getAdapter().getItemCount() > 10;
             }
         });
         return view;
@@ -1432,10 +1470,8 @@ public class ViewUtil {
         } catch (Exception e) {
             e.printStackTrace();
         }
-
     }
 
-
     public static String getNetImgByName(String name) {
         return String.format(Locale.CHINA, "http://cdngame.kuaifazs.com/%s.png", name);
     }
@@ -1486,5 +1522,31 @@ public class ViewUtil {
         return result;
     }
 
+    /**
+     * paint
+     * R.color.green
+     * R.color.yellow_text_light
+     * R.color.black_text_gray
+     *
+     android:textColor="#cc8e8e8e"
+     android:textSize="10sp"
+     R.drawable.shape_blue_stroke_rectangle_no_lb
+     */
+    public View paintView(Context context, String text, int color, int drawable){
+
+        View view = View.inflate(context, R.layout.game_tag_textview, null);
+        TextView textView = view.findViewById(R.id.user_label_tv);
 
+        textView.setText(text);
+        textView.setTextColor(color);
+        textView.setBackgroundResource(drawable);
+        textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 10);
+        int padding = textView.getContext().getResources().getDimensionPixelSize(R.dimen.content_padding_2);
+        textView.setPadding(2* padding, padding, 2 * padding, padding);
+        LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(textView.getLayoutParams());
+        lp.setMargins(0,0,padding,0);
+        textView.setLayoutParams(lp);
+
+        return view;
+    }
 }

+ 0 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/ActFindGame.java

@@ -671,6 +671,5 @@ public class ActFindGame extends BaseActivity {
     protected void onDestroy() {
         super.onDestroy();
         EventBus.getDefault().unregister(this);
-        Aria.download(this).unRegister();
     }
 }

+ 0 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/ActFindInformation.java

@@ -638,7 +638,6 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
     protected void onDestroy() {
         super.onDestroy();
         LogUtil.logI("释放资源");
-        Aria.download(this).unRegister();
         EventBus.getDefault().unregister(this);
         taskHelper.destroy();
         if (webView != null) {

+ 40 - 28
app/src/main/java/com/sheep/gamegroup/view/activity/ActPlayGameDetail.java

@@ -2,16 +2,11 @@ package com.sheep.gamegroup.view.activity;
 
 import android.app.Activity;
 import android.content.Intent;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
 import android.support.design.widget.AppBarLayout;
 import android.support.design.widget.TabLayout;
-import android.support.v4.view.ViewPager;
 import android.support.v7.widget.AppCompatRatingBar;
 import android.text.TextUtils;
 import android.view.View;
-import android.view.ViewGroup;
 import android.widget.ImageButton;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
@@ -24,7 +19,7 @@ import com.arialyy.aria.core.download.DownloadTask;
 import com.kfzs.duanduan.event.BigEvent;
 import com.kfzs.duanduan.mine.GiftpackListAdapter;
 import com.kfzs.duanduan.services.DownloadTaskService;
-import com.kfzs.duanduan.utils.dlg.HelperUtils;
+import com.kfzs.duanduan.view.ViewPagerAutoHeigh;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.GameEntity;
@@ -37,7 +32,6 @@ import com.sheep.gamegroup.util.TimeUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.fragment.FgtPlaGameGift;
 import com.sheep.gamegroup.view.fragment.FgtPlayGameDetail;
-import com.sheep.gamegroup.view.fragment.FgtPlayGameSon;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
@@ -49,12 +43,10 @@ import org.greenrobot.eventbus.EventBus;
 import org.greenrobot.eventbus.Subscribe;
 
 import java.util.HashMap;
-import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 
 import butterknife.BindView;
-import butterknife.ButterKnife;
 import rx.android.schedulers.AndroidSchedulers;
 import rx.functions.Action1;
 import rx.schedulers.Schedulers;
@@ -69,10 +61,6 @@ import static android.content.Intent.ACTION_PACKAGE_REMOVED;
 public class ActPlayGameDetail extends BaseActivity implements Action1<Integer> {
     @BindView(R.id.appbar_act_game_details)
     AppBarLayout appbarActGameDetails;
-    @BindView(R.id.bottom_line_text)
-    TextView bottomLineText;
-    @BindView(R.id.bottom_line)
-    LinearLayout bottomLine;
     @BindView(R.id.status_height_view)
     View statusHeightView;
     @BindView(R.id.find_game_bar)
@@ -96,7 +84,7 @@ public class ActPlayGameDetail extends BaseActivity implements Action1<Integer>
     @BindView(R.id.find_game_down_tv)
     TextView find_game_down_tv;
     @BindView(R.id.viewpager_act_game_details)
-    ViewPager mViewPager;
+    ViewPagerAutoHeigh mViewPager;
     @BindView(R.id.tabLayout)
     TabLayout tabLayout;
     @BindView(R.id.welfare_gift_layout)
@@ -105,6 +93,8 @@ public class ActPlayGameDetail extends BaseActivity implements Action1<Integer>
     TextView welfare_tv;
     @BindView(R.id.gift_tv)
     TextView gift_tv;
+    @BindView(R.id.ll_game_tag)
+    LinearLayout ll_game_tag;
 
     private Activity activity;
     private int id;
@@ -133,6 +123,7 @@ public class ActPlayGameDetail extends BaseActivity implements Action1<Integer>
         EventBus.getDefault().register(this);
         Aria.download(this).register();
 
+        mAdapter = new GiftpackListAdapter(getSupportFragmentManager(), SheepApp.getInstance());
         txt_baseactivity_title.setVisibility(View.INVISIBLE);//不显示标题栏
 
         RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, 0);
@@ -174,12 +165,16 @@ public class ActPlayGameDetail extends BaseActivity implements Action1<Integer>
                 layoutParams2.leftMargin = Math.max(titleWidth + row + 2 * leftRow, (G.WIDTH - nameWidth) / 2 + verticalOffset);
                 layoutParams2.topMargin = Math.max(topRow2, getResources().getDimensionPixelSize(R.dimen.find_game_top2) + verticalOffset);
                 find_game_name_tv.setLayoutParams(layoutParams2);
+                //tag
+                RelativeLayout.LayoutParams layoutParams6 = (RelativeLayout.LayoutParams) ll_game_tag.getLayoutParams();
+                layoutParams6.topMargin = getResources().getDimensionPixelSize(R.dimen.find_game_top165) + verticalOffset;
+                ll_game_tag.setLayoutParams(layoutParams6);
                 //信息位置变化
                 RelativeLayout.LayoutParams layoutParams3 = (RelativeLayout.LayoutParams) find_game_info_tv.getLayoutParams();
                 int left1 = (G.WIDTH - infoWidth) / 2;
                 int left2 = titleWidth + row + 2 * leftRow;
                 layoutParams3.leftMargin = left1;//left2 > left1 ? Math.min(left2, left1 - verticalOffset) : Math.max(left2, left1 + verticalOffset);
-                layoutParams3.topMargin = /*Math.max(find_game_name_tv.getHeight() + 4 * topRow, */getResources().getDimensionPixelSize(R.dimen.find_game_top3) + verticalOffset/*)*/;
+                layoutParams3.topMargin = /*Math.max(find_game_name_tv.getHeight() + 4 * topRow, */getResources().getDimensionPixelSize(R.dimen.find_game_top190) + verticalOffset/*)*/;
                 find_game_info_tv.setLayoutParams(layoutParams3);
                 //下载按钮位置变化
                 RelativeLayout.LayoutParams layoutParams4 = (RelativeLayout.LayoutParams) welfare_gift_layout.getLayoutParams();
@@ -189,7 +184,6 @@ public class ActPlayGameDetail extends BaseActivity implements Action1<Integer>
                 //星级位置变化
                 RelativeLayout.LayoutParams layoutParams5 = (RelativeLayout.LayoutParams) find_game_xin.getLayoutParams();
                 layoutParams5.topMargin = getResources().getDimensionPixelSize(R.dimen.find_game_top210) + verticalOffset;
-                find_game_xin.setLayoutParams(layoutParams5);
                 if (willTop == topRow/2) {
                     if (mIsExpanded) {
 //                        txt_baseactivity_title.setVisibility(View.INVISIBLE);
@@ -210,22 +204,11 @@ public class ActPlayGameDetail extends BaseActivity implements Action1<Integer>
             }
         });
 
-        //viewpaper
-        initViewPaper();
         resetData();
 
         initData();
     }
 
-    private void initViewPaper() {
-        mAdapter = new GiftpackListAdapter(getSupportFragmentManager(), SheepApp.getInstance());
-        mAdapter.add(FgtPlayGameDetail.newInstance(gameEntity), "详情");
-        mAdapter.add(FgtPlaGameGift.newInstance(gameEntity), "礼包");
-        mViewPager.setAdapter(mAdapter);
-        tabLayout.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(mViewPager));
-        tabLayout.setupWithViewPager(mViewPager);
-        CommonUtil.getInstance().reflex(tabLayout, activity);
-    }
     private void resetData() {
         //游戏简介与下载
         ViewUtil.setText(find_game_name_tv);
@@ -274,6 +257,36 @@ public class ActPlayGameDetail extends BaseActivity implements Action1<Integer>
 
         updateView(this, gameEntity.getApp(), find_game_down_tv);
 
+        mAdapter.clearData();
+        mAdapter.add(FgtPlayGameDetail.newInstance(gameEntity), "详情");
+        //ViewPager
+        //welfare_gift_layout
+        if(gameEntity.isGiftAndBonus()){
+            welfare_gift_layout.setVisibility(View.GONE);
+        }else {
+            welfare_gift_layout.setVisibility(View.VISIBLE);
+            if(gameEntity.isGift()){
+                gift_tv.setVisibility(View.VISIBLE);
+                mAdapter.add(FgtPlaGameGift.newInstance(gameEntity), "礼包");
+            }else {
+                gift_tv.setVisibility(View.GONE);
+            }
+            if(TextUtils.isEmpty(gameEntity.getBonusText())){
+                welfare_tv.setVisibility(View.GONE);
+            }else {
+                welfare_tv.setVisibility(View.VISIBLE);
+                ViewUtil.setText(welfare_tv, String.format(Locale.CHINA, "+%s元", gameEntity.getBonusText()));
+            }
+        }
+
+        mViewPager.setAdapter(mAdapter);
+        tabLayout.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(mViewPager));
+        tabLayout.setupWithViewPager(mViewPager);
+        CommonUtil.getInstance().reflex(tabLayout, activity);
+
+        //tag 标签绘制
+        CommonUtil.getInstance().paintLineaLayout(activity, gameEntity, ll_game_tag, 4,R.color.txt_bule, R.drawable.shape_blue_stroke_rectangle_no_lb);
+
     }
 
     //更新按钮状态与添加点击事件
@@ -325,7 +338,6 @@ public class ActPlayGameDetail extends BaseActivity implements Action1<Integer>
     @Override
     protected void onDestroy() {
         super.onDestroy();
-        Aria.download(this).unRegister();
         EventBus.getDefault().unregister(this);
     }
     //获取任务对应的TextView来更新进度

+ 7 - 6
app/src/main/java/com/sheep/gamegroup/view/activity/SplashAct.java

@@ -125,7 +125,7 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
                         sendHandlerMessages(100);
                     break;
                 case 1:
-                    if(SysAppUtil.isNewSmallSheep(false)){//新版本只显示引导页面,不展示弹窗和开屏广告
+                    if(SysAppUtil.isNewSmallSheep()){//新版本只显示引导页面,不展示弹窗和开屏广告
                         isLoaddingData = false;
                         sendHandlerMessages(200);
                     } else {
@@ -191,11 +191,12 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
     public void initView() {
         activity = this;
         GlideImageLoader.setImage(login_bg_img, "http://cdngame.kuaifazs.com/login_bg_img.png");
-        if(BuildConfig.DEBUG){
-            Jump2View.getInstance().goHomePageView(activity, null);
-        } else {
-            mHandler.sendEmptyMessageDelayed(1, 500);
-        }
+//        if(BuildConfig.DEBUG){
+//            Jump2View.getInstance().goHomePageView(activity, null);
+//        } else {
+//            mHandler.sendEmptyMessageDelayed(1, 500);
+//        }
+        mHandler.sendEmptyMessageDelayed(1, 500);
     }
 
     @Override

+ 0 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/TaskDetailAct.java

@@ -1464,6 +1464,5 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
     protected void onDestroy() {
         super.onDestroy();
         CommonUtil.getInstance().cancelAllTimers(CommonUtil.getInstance().timerHashMap);
-        Aria.download(this).unRegister();
     }
 }

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

@@ -82,7 +82,7 @@ public class GiftCenterAdapter extends AdbCommonRecycler<GiftBagApp> {
                 return;
             }
             GlideImageLoader.setGameImage(item_download_welfare_iv, itemApp.getIcon());
-            ViewUtil.setText(item_download_welfare_name_tv, itemApp.getName());
+            ViewUtil.setText(item_download_welfare_name_tv, itemGiftBag.getGiftName());
             ViewUtil.setText(item_download_welfare_date_tv, itemGiftBag.getDateText());
             if(TextUtils.isEmpty(item.getCode())){//没有code,就视为没有领取礼包
                 item_download_welfare_tip_iv.setVisibility(View.GONE);
@@ -110,7 +110,7 @@ public class GiftCenterAdapter extends AdbCommonRecycler<GiftBagApp> {
                     public void onClick(View view) {
                         ViewUtil.showMsgDialog(context, new DialogConfig().setTitle("礼包使用说明").setBtnLeftText("我知道了")
                                 .setMsgGravity(Gravity.START)
-                                .setMsg(String.format(Locale.CHINA, "礼包内容:\n%s\n\n使用方式:\n启动游戏---设置---激活兑换", itemGiftBag.getGiftContent())));
+                                .setMsg(String.format(Locale.CHINA, "礼包内容:\n%s\n\n使用方式:\n%s", itemGiftBag.getGiftContent(), itemGiftBag.getUseMethod())));
                     }
                 });
 

+ 24 - 2
app/src/main/java/com/sheep/gamegroup/view/adapter/PlayGameItemAdapter.java

@@ -2,12 +2,15 @@ package com.sheep.gamegroup.view.adapter;
 
 import android.app.Activity;
 import android.content.Context;
+import android.text.TextUtils;
 import android.view.View;
 import android.widget.ImageView;
+import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import com.sheep.gamegroup.model.entity.GameEntity;
 import com.sheep.gamegroup.model.entity.PlayGameEntity;
+import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.ViewHolder;
@@ -41,14 +44,33 @@ public class PlayGameItemAdapter extends AdbCommonRecycler<GameEntity>{
             }
         });
         View item_download_welfare_line = holder.itemView.findViewById(R.id.line_tv);
-        View detail_task_tv_center = holder.itemView.findViewById(R.id.detail_task_tv_center);
+        TextView detail_task_tv_center = holder.itemView.findViewById(R.id.detail_task_tv_center);
         TextView item_name_tv = holder.itemView.findViewById(R.id.item_name_tv);
         TextView item_date_tv = holder.itemView.findViewById(R.id.item_date_tv);
+        LinearLayout ll_game_tag = holder.itemView.findViewById(R.id.ll_game_tag);
 
         ViewUtil.setText(item_name_tv, gameEntity.getApp().getName());
         ViewUtil.setText(item_date_tv, gameEntity.getApp().getPackage_size()+"M");
         GlideImageLoader.setGameImage((ImageView) holder.itemView.findViewById(R.id.item_icon_iv), gameEntity.getApp().getIcon());
-
+        if (gameEntity.getApp().isCanDonload()) {//可下载
+            gameEntity.getApp().getFindAppHelper().updateDownloadTaskView((Activity) activity, gameEntity.getApp(), detail_task_tv_center);
+        } else {//预约下载
+            gameEntity.getApp().getFindAppHelper().updateReservationView((Activity) activity, gameEntity.getApp(), detail_task_tv_center);
+        }
         item_download_welfare_line.setVisibility(holder.getAdapterPosition() + 1 == getItemCount() ? View.GONE : View.VISIBLE);
+
+        //tag 标签绘制
+        ll_game_tag.removeAllViews();
+        if(gameEntity.isGift()){
+            ll_game_tag.addView(ViewUtil.newInstance().paintView(activity, "礼包", R.color.red_FD2D54, R.drawable.shape_red_stroke_rectangle_no_lb));
+        }else {
+        }
+        if(TextUtils.isEmpty(gameEntity.getBonusText())){
+        }else {
+            ll_game_tag.addView(ViewUtil.newInstance().paintView(activity, "福利", R.color.yellow_D3AF57, R.drawable.shape_yellow_stroke_rectangle_no_lb));
+        }
+        CommonUtil.getInstance().paintLineaLayout(activity, gameEntity, ll_game_tag, 2,R.color.txt_bule, R.drawable.shape_blue_stroke_rectangle_no_lb);
+
+
     }
 }

+ 5 - 3
app/src/main/java/com/sheep/gamegroup/view/adapter/WelfareAdapter.java

@@ -76,15 +76,15 @@ public class WelfareAdapter extends AdbCommonRecycler<TaskReleaseEty>{
             }
             GlideImageLoader.setGameImage(item_download_welfare_iv, itemTask.getIcon());
             ViewUtil.setText(item_download_welfare_name_tv, item.getName());
-            item_download_welfare_money.setText(Html.fromHtml(String.format(Locale.CHINA, "<font size='1'>¥</font>%s", item.getBonusText())));
+            ViewUtil.setH5Text(item_download_welfare_money, item.getH5BonusText());
             ViewUtil.setText(item_download_welfare_num_tv, item.getGiftRatioText());
-            ViewUtil.setText(item_download_welfare_num_tv1, item.getLastNumText());
             ViewUtil.setText(item_download_welfare_date_tv, item.getDateText());
             item_download_welfare_iv2.setVisibility(item.isTaskFinished()? View.VISIBLE : View.INVISIBLE);
 
             item_download_welfare_btn_bottom.setTag(PUBLIC_TAG_PREFIX_TEXTVIEW_LIST + itemTask.getDownload_link());
             switch (item.getUser_task_status()){//1,已接受任务 2,正在进行中,3完成任务,4放弃任务,5任务失败,6审核失败,7提交审核,8任务已下线,9至少完成了一个任务了
                 case 0:
+                    ViewUtil.setText(item_download_welfare_num_tv1, item.getLastNumText());
                     item_download_welfare_money.setVisibility(View.VISIBLE);
                     item_download_welfare_btn_top.setVisibility(View.INVISIBLE);
                     item_download_welfare_btn_bottom.setEnabled(true);
@@ -98,6 +98,7 @@ public class WelfareAdapter extends AdbCommonRecycler<TaskReleaseEty>{
                     break;
                 case 1:
                 case 2:
+                    ViewUtil.setText(item_download_welfare_num_tv1, item.getLastNumText());
                     item_download_welfare_money.setVisibility(View.VISIBLE);
                     item_download_welfare_btn_top.setVisibility(View.INVISIBLE);
                     item_download_welfare_btn_bottom.setEnabled(true);
@@ -123,6 +124,7 @@ public class WelfareAdapter extends AdbCommonRecycler<TaskReleaseEty>{
                     }
                     break;
                 case 3:
+                    ViewUtil.setH5Text(item_download_welfare_num_tv1, item.getH5BonusText());
                     item_download_welfare_money.setVisibility(View.INVISIBLE);
                     item_download_welfare_btn_top.setVisibility(View.VISIBLE);
                     item.getDownloadHelper().updateDownloadTaskView((Activity) context, itemTask, item_download_welfare_btn_bottom);
@@ -141,6 +143,7 @@ public class WelfareAdapter extends AdbCommonRecycler<TaskReleaseEty>{
                     });
                     break;
                 default:
+                    ViewUtil.setText(item_download_welfare_num_tv1, item.getLastNumText());
                     item_download_welfare_money.setVisibility(View.VISIBLE);
                     item_download_welfare_btn_top.setVisibility(View.INVISIBLE);
                     item_download_welfare_btn_bottom.setText("已经下线");
@@ -177,7 +180,6 @@ public class WelfareAdapter extends AdbCommonRecycler<TaskReleaseEty>{
 
                     @Override
                     public void onNext(BaseMessage baseMessage) {//领取任务成功
-                        G.showToast(baseMessage);
                         if(action1 != null)
                             action1.call(TO_REFRESH);
                     }

+ 1 - 15
app/src/main/java/com/sheep/gamegroup/view/fragment/BaseListFragment.java

@@ -65,7 +65,6 @@ public abstract class BaseListFragment<T> extends BaseFragment {
     public void initView() {
         title.setVisibility(View.GONE);
     }
-    private View bottomLine;
     public void initListener() {
         view_list.setLoadingListener(new XRecyclerView.LoadingListener() {
             @Override
@@ -83,7 +82,7 @@ public abstract class BaseListFragment<T> extends BaseFragment {
                 }
             }
         });
-        bottomLine = ViewUtil.setBottomLine(view_list);
+        ViewUtil.setBottomLine(view_list);
         view_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
         view_list.setAdapter(getAdapter());
 
@@ -141,19 +140,6 @@ public abstract class BaseListFragment<T> extends BaseFragment {
     }
     protected void notifyDataSetChanged(){
         CommonUtil.getInstance().updateEmptyView(empty_view, list.isEmpty());
-        if(bottomLine != null) {
-            bottomLine.setVisibility(list.isEmpty() ? View.INVISIBLE : View.VISIBLE);
-            final boolean isCanScrollToPosition = page > 1 ;//页数大于一页才显示点击回到顶部
-            TextView bottom_line_text = bottomLine.findViewById(R.id.bottom_line_text);
-            bottom_line_text.setText(isCanScrollToPosition ? "我是有底线的,点击我回到顶部" : "我是有底线的");
-            bottomLine.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View view) {
-                    if(isCanScrollToPosition)
-                        view_list.scrollToPosition(0);
-                }
-            });
-        }
         if(page == 1){
             view_list.refreshComplete();
         } else {

+ 6 - 1
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGiftCenter.java

@@ -35,7 +35,12 @@ public class FgtGiftCenter extends BaseListFragment<GiftBagApp> implements Actio
     public void call(Integer integer) {
         switch (integer){
             case WelfareAdapter.TO_REFRESH:
-                refreshData();
+                view_list.postDelayed(new Runnable() {
+                    @Override
+                    public void run() {
+                        refreshData();
+                    }
+                }, 500L);//延迟500毫秒刷新界面,防止服务器数据没有反应过来
                 break;
         }
     }

+ 38 - 21
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtMyGame.java

@@ -5,6 +5,7 @@ import android.os.Bundle;
 import android.support.v4.widget.SwipeRefreshLayout;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
+import android.text.TextUtils;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -13,6 +14,7 @@ import android.widget.TextView;
 
 import com.arialyy.annotations.Download;
 import com.arialyy.aria.core.download.DownloadTask;
+import com.jcodecraeer.xrecyclerview.XRecyclerView;
 import com.kfzs.duanduan.utils.ApkUtils;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.OrienteeringDetail;
@@ -22,6 +24,7 @@ import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.adapter.TryMakeMoneyAdp;
 import com.sheep.gamegroup.view.customview.SheepmSwipeRefreshLayout;
 import com.sheep.jiuyan.samllsheep.R;
@@ -52,16 +55,14 @@ public class FgtMyGame extends BaseFragment {
     @BindView(R.id.empty_view_msg)
     TextView txtListEmpty;
     @BindView(R.id.recyclerview)
-    RecyclerView recyclerview;
-    @BindView(R.id.refresh)
-    SheepmSwipeRefreshLayout refresh;
+    XRecyclerView recyclerview;
     @BindView(R.id.empty_view)
     View empty_view;
     Unbinder unbinder;
     private Activity activity;
     private TryMakeMoneyAdp tryMakeMoneyAdp;
     private int page = 1;//页数
-    private int per_page = 100;
+    private int per_page = 10;
     private List<OrienteeringDetail> list = ListUtil.emptyList();
     private int type = 0;
 
@@ -92,35 +93,32 @@ public class FgtMyGame extends BaseFragment {
         tryMakeMoneyAdp.add(RecyleObj.make(RecyleType.NONE, null));
         recyclerview.setAdapter(tryMakeMoneyAdp);
         initListener();
+        bottomLine = ViewUtil.setBottomLine(recyclerview);
 
     }
+    private View bottomLine;
 
     public void initListener() {
-        refresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
+        recyclerview.setLoadingListener(new XRecyclerView.LoadingListener() {
             @Override
             public void onRefresh() {
+                page = 1;
                 refreshData();
             }
-        });
-        recyclerview.addOnScrollListener(new RecyclerView.OnScrollListener() {
-            @Override
-            public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
-                super.onScrollStateChanged(recyclerView, newState);
-            }
 
             @Override
-            public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
-
-                int topRowVerticalPosition =
-                        (recyclerView == null || recyclerView.getChildCount() == 0) ? 0 : recyclerView.getChildAt(0).getTop();
-
-                refresh.setEnabled(topRowVerticalPosition >= 0);
+            public void onLoadMore() {
+                if(ListUtil.size(list) >= per_page*page){
+                    page += 1;
+                    refreshData();
+                }else {
+                    recyclerview.setNoMore(true);
+                }
             }
         });
     }
 
     private void initData() {
-        refresh.setRefreshing(true);
         List<OrienteeringDetail> newList = DataUtil.getInstance().getCacheList(ApiKey.my_games, OrienteeringDetail.class);
         if(!ListUtil.isEmpty(newList)) {
             ListUtil.addAll(list, newList);
@@ -147,9 +145,25 @@ public class FgtMyGame extends BaseFragment {
                     }
                 });
     }
+    private void notifyBottomLine(boolean noMore) {
+        if(bottomLine != null) {
+            int count = list.size();
+            bottomLine.setVisibility(count == 0 ? View.INVISIBLE : View.VISIBLE);
+            if(noMore) {
+                final boolean isCanScrollToPosition = count > 10;//页数大于一页才显示点击回到顶部
+                TextView bottom_line_text = bottomLine.findViewById(R.id.bottom_line_text);
+                bottom_line_text.setText(isCanScrollToPosition ? "我是有底线的,点击我回到顶部" : "我是有底线的");
+                bottomLine.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        if (isCanScrollToPosition)
+                            recyclerview.scrollToPosition(0);
+                    }
+                });
+            }
+        }
+    }
     private void checkAndInitView() {
-        if(refresh == null)
-            refresh = findViewById(R.id.refresh);
         if(empty_view == null)
             empty_view = findViewById(R.id.empty_view);
     }
@@ -161,7 +175,10 @@ public class FgtMyGame extends BaseFragment {
             tryMakeMoneyAdp.add(RecyleObj.make(RecyleType.GAME_TASK, list),0);
         }
         tryMakeMoneyAdp.refreshAdapter();
-        refresh.setRefreshing(false);
+        recyclerview.refreshComplete();
+        recyclerview.loadMoreComplete();
+
+        notifyBottomLine(false);
     }
 
     @Override

+ 26 - 5
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtPlaGameGift.java

@@ -12,6 +12,7 @@ import android.widget.TextView;
 
 import com.sheep.gamegroup.model.entity.GameEntity;
 import com.sheep.gamegroup.model.entity.GiftBagApp;
+import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.ViewHolder;
 import com.sheep.gamegroup.util.ViewUtil;
@@ -27,6 +28,7 @@ import java.util.Locale;
 import butterknife.BindView;
 import butterknife.ButterKnife;
 import butterknife.Unbinder;
+import rx.functions.Action1;
 
 /**
  * Created by ljy on 2018/9/4.
@@ -70,20 +72,39 @@ public class FgtPlaGameGift extends BaseFragment {
             }
 
             @Override
-            public void convert(ViewHolder holder, GiftBagApp giftBagApp) {
+            public void convert(ViewHolder holder, final GiftBagApp giftBagApp) {
                 View view = holder.itemView;
                 ViewUtil.setText((TextView) holder.getView(R.id.name_tv), giftBagApp.getGift_bag().getGiftName());
                 ViewUtil.setText((TextView) holder.getView(R.id.num_tv), giftBagApp.getGift_bag().getLastNumText());
 
-                TextView btn_tv = holder.getView(R.id.btn_tv);
+                final TextView btn_tv = holder.getView(R.id.btn_tv);
 
-                if (giftBagApp.isReceived()){
-                    btn_tv.setText("领取");
+                if(gameEntity.getIs_reservation() == 0 || !gameEntity.getApp().isCanDonload()){
 
+                    btn_tv.setText("领取");
+                    btn_tv.setEnabled(false);
+                }else
+                if (!giftBagApp.isReceived()){
+                    btn_tv.setText("领取");
+                    btn_tv.setEnabled(true);
+                    btn_tv.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View v) {
+                            CommonUtil.getInstance().receiveAward(activity, gameEntity.getRelease_task(), new Action1<Integer>() {
+                                @Override
+                                public void call(Integer integer) {
+                                    giftBagApp.setReceived(true);
+                                    btn_tv.setText("已领取");
+                                    btn_tv.setEnabled(false);
+                                    notifyDataSetChanged();
+                                }
+                            });
+                        }
+                    });
                 }else {
                     btn_tv.setText("已领取");
+                    btn_tv.setEnabled(false);
                 }
-                btn_tv.setEnabled(false);
                 holder.getView(R.id.line_tv).setVisibility(holder.getAdapterPosition() + 1 == getItemCount() ? View.GONE : View.VISIBLE);
             }
         });

+ 17 - 13
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtPlayGame.java

@@ -77,10 +77,6 @@ public class FgtPlayGame extends BaseFragment {
     TabLayout indicator;
     @BindView(R.id.viewpager_act_game_details)
     ViewPager pager;
-    @BindView(R.id.bottom_line_text)
-    TextView bottomLineText;
-    @BindView(R.id.bottom_line)
-    LinearLayout bottomLine;
     @BindView(R.id.refresh)
     SwipeRefreshLayout refresh;
     @BindView(R.id.scrollView)
@@ -270,6 +266,21 @@ public class FgtPlayGame extends BaseFragment {
 
     private void initData(){
 
+        //轮播
+        List<SlideshowEty> cacheSlideshowEtyList = DataUtil.getInstance().getCacheList(ApiKey.slideshowGame, SlideshowEty.class);
+        if (ListUtil.isEmpty(cacheSlideshowEtyList)) {
+            banner.setVisibility(View.GONE);
+        } else {
+            slideshowEtyLists.clear();
+            slideshowTitleList.clear();
+            for (SlideshowEty slideshowEty : cacheSlideshowEtyList) {
+                slideshowEty.setObjects(CommonUtil.getInstance().getValue(slideshowEty.getExt()));
+                slideshowEtyLists.add(slideshowEty);
+                slideshowTitleList.add(slideshowEty.getTitle());
+            }
+            bindBanner();
+        }
+
         SheepApp.getInstance().getNetComponent().getApiService().gameBanner(1)
                 .subscribeOn(Schedulers.io())
                 .observeOn(AndroidSchedulers.mainThread())
@@ -281,7 +292,7 @@ public class FgtPlayGame extends BaseFragment {
 
                     @Override
                     public void onNext(BaseMessage baseMessage) {
-                        boolean isNewData = DataUtil.getInstance().isNewData(ApiKey.slideshow);
+                        boolean isNewData = DataUtil.getInstance().isNewData(ApiKey.slideshowGame);
                         if (isNewData) {
                             List<SlideshowEty> slideshowEtyList = baseMessage.getDataList(SlideshowEty.class);
                             if (ListUtil.isEmpty(slideshowEtyList)) {
@@ -296,10 +307,6 @@ public class FgtPlayGame extends BaseFragment {
                                 }
                                 bindBanner();
                             }
-                        }else {
-                            if (ListUtil.isEmpty(slideshowEtyLists)) {
-                                banner.setVisibility(View.GONE);
-                            }
                         }
                         notifyDataSetChanged();
                     }
@@ -395,7 +402,7 @@ public class FgtPlayGame extends BaseFragment {
         }
     }
 
-    @OnClick({R.id.every_day_more_tv, R.id.recent_hot_more_tv,  R.id.bottom_line})
+    @OnClick({R.id.every_day_more_tv, R.id.recent_hot_more_tv})
     public void onViewClicked(View view) {
         switch (view.getId()) {
             case R.id.every_day_more_tv:
@@ -404,9 +411,6 @@ public class FgtPlayGame extends BaseFragment {
             case R.id.recent_hot_more_tv:
                 Jump2View.getInstance().goEverydayOrCurrentHotGame(activity, 1);
                 break;
-            case R.id.bottom_line://我是有底线的,双击我回到顶部
-                scrollView.fullScroll(NestedScrollView.FOCUS_UP);
-                break;
         }
     }
     @Subscribe

+ 52 - 1
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtPlayGameDetail.java

@@ -7,14 +7,21 @@ import android.text.TextUtils;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.LinearLayout;
+import android.widget.ProgressBar;
+import android.widget.TextView;
 
 import com.sheep.gamegroup.helper.ImageListHelper;
 import com.sheep.gamegroup.model.entity.GameEntity;
+import com.sheep.gamegroup.model.entity.TaskDescEntity;
+import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.MyListview;
 import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.ArrayAdapter;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
+import com.sheep.jiuyan.samllsheep.utils.G;
 import com.tencent.smtt.sdk.WebView;
 
 import java.util.ArrayList;
@@ -35,6 +42,14 @@ public class FgtPlayGameDetail extends BaseFragment {
     WebView find_game_info_wv;
     @BindView(R.id.item_detail_listview)
     MyListview item_detail_listview;
+    @BindView(R.id.progressBarHorizontal)
+    ProgressBar progressBarHorizontal;
+    @BindView(R.id.last_num_tv)
+    TextView last_num_tv;
+    @BindView(R.id.progress_title_layout)
+    LinearLayout progress_title_layout;
+    @BindView(R.id.receive_step_layout)
+    LinearLayout receive_step_layout;
     Unbinder unbinder;
 
     private ArrayList<String> pictureList = ListUtil.emptyList();
@@ -60,7 +75,7 @@ public class FgtPlayGameDetail extends BaseFragment {
         activity = getActivity();
         imageListHelper.initList(activity, find_game_list, pictureList);
 
-        if(gameEntity == null || gameEntity.getApp() == null)
+        if(gameEntity == null || gameEntity.getApp() == null )
             return;
 
         //游戏图片banner
@@ -74,6 +89,42 @@ public class FgtPlayGameDetail extends BaseFragment {
             find_game_list.setVisibility(View.GONE);
         }
         ViewUtil.loadDataWithBaseURL(find_game_info_wv, gameEntity.getApp().getIntro());
+
+        //奖励领取步骤
+        if(gameEntity.getRelease_task() != null && gameEntity.getRelease_task().getTask().getDescEntityList() != null && gameEntity.getRelease_task().getTask().getDescEntityList().size() > 0){
+            receive_step_layout.setVisibility(View.VISIBLE);
+            item_detail_listview.setAdapter(new ArrayAdapter<TaskDescEntity>(activity, R.layout.textview_layout, gameEntity.getRelease_task().getTask().getDescEntityList()){
+                @Override
+                public boolean convert(int position, View convertView, ViewGroup parent, TaskDescEntity item) {
+                    TaskDescEntity taskDescEntity = item;
+                    if(taskDescEntity == null){
+                        return true;
+                    }
+                    TextView textView = convertView.findViewById(R.id.textview);
+                    CommonUtil.getInstance()
+                            .bindDataTaskDetailSonStep(taskDescEntity, textView, position);
+                    return true;
+                }
+
+                @Override
+                public boolean areAllItemsEnabled() {
+                    return false;
+                }
+            });
+        }else {
+            receive_step_layout.setVisibility(View.GONE);
+        }
+        int progress;
+        if(gameEntity.getRelease_task() != null && Integer.valueOf(gameEntity.getRelease_task().getRelease_num()) != 0){
+            progress_title_layout.setVisibility(View.VISIBLE);
+            progress = Integer.valueOf(gameEntity.getRelease_task().getLast_num()) / Integer.valueOf(gameEntity.getRelease_task().getRelease_num()) * 100;
+            //福利剩余数量
+            progressBarHorizontal.incrementProgressBy(progress);
+            last_num_tv.setText(gameEntity.getRelease_task().getLastNumText());
+        }else {
+            progress = 0;
+            progress_title_layout.setVisibility(View.GONE);
+        }
     }
 
     @Override

+ 50 - 11
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtTryMakeMoney.java

@@ -14,6 +14,7 @@ import android.widget.TextView;
 import com.jcodecraeer.xrecyclerview.XRecyclerView;
 import com.kfzs.duanduan.event.BigEvent;
 import com.kfzs.duanduan.event.EventTypes;
+import com.kfzs.duanduan.utils.NumberFormatUtils;
 import com.sheep.gamegroup.di.components.DaggerFgtTryMakeMoneyComponent;
 import com.sheep.gamegroup.di.modules.TryMakeMoneyModule;
 import com.sheep.gamegroup.model.entity.BaseMessage;
@@ -40,6 +41,8 @@ import org.afinal.simplecache.ApiKey;
 import org.greenrobot.eventbus.EventBus;
 
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
 import java.util.List;
 
 import javax.inject.Inject;
@@ -47,6 +50,7 @@ import javax.inject.Inject;
 import butterknife.BindView;
 import butterknife.ButterKnife;
 import butterknife.Unbinder;
+import rx.functions.Action1;
 
 
 /**
@@ -70,23 +74,33 @@ public class FgtTryMakeMoney extends BaseFragment implements TryMakeMoneyContrac
     private List<TaskReleaseEty> releaseEtyListsBegin = new ArrayList<>();
     private int about_to_begin = 0;
     private String show_type;//有值代表来自主页
+    private boolean isFromHome = false;//来自主页
     private int is_succession;//0:一般任务 1:连续任务
 
     private void checkAndInitView() {
         if (empty_view == null)
             empty_view = findViewById(R.id.empty_view);
+        if (recyclerview == null)
+            recyclerview = findViewById(R.id.recyclerview);
     }
 
     private static final int LIST_COUNT = 3;//tryMakeMoneyAdp 总共有3条数据
     private static final RecyleObj NULL = RecyleObj.make(RecyleType.NONE, null);//空数据
-
+    private Comparator<TaskReleaseEty> comparator = new Comparator<TaskReleaseEty>() {
+        @Override
+        public int compare(TaskReleaseEty item1, TaskReleaseEty item2) {
+            return item2.getLastNum1Or0() - item1.getLastNum1Or0();
+        }
+    };
     private void notifyDataSetChanged() {
         checkAndInitView();
         tryMakeMoneyAdp.clear();
         if (!ListUtil.isEmpty(acceptedEtyList))
             tryMakeMoneyAdp.add(RecyleObj.make(RecyleType.RUN_TASK, acceptedEtyList));
-        if (!ListUtil.isEmpty(releaseEtyLists))
+        if (!ListUtil.isEmpty(releaseEtyLists)) {
+            Collections.sort(releaseEtyLists, comparator);
             tryMakeMoneyAdp.add(RecyleObj.make(RecyleType.RELEASE_TASK, releaseEtyLists));
+        }
         if (!ListUtil.isEmpty(releaseEtyListsBegin))
             tryMakeMoneyAdp.add(RecyleObj.make(RecyleType.BEGIN_TASK, releaseEtyListsBegin));
         tryMakeMoneyAdp.refreshAdapter();
@@ -95,13 +109,13 @@ public class FgtTryMakeMoney extends BaseFragment implements TryMakeMoneyContrac
         recyclerview.refreshComplete();
         recyclerview.loadMoreComplete();
         notifyBottomLine(false);
-        if (!TextUtils.isEmpty(show_type))
+        if (isFromHome)
             EventBus.getDefault().post(BigEvent.get().setEventTypes(EventTypes.FGT_SHEEP_REFRESH_H));
     }
 
     private void notifyBottomLine(boolean noMore) {
         if(bottomLine != null) {
-            if (!TextUtils.isEmpty(show_type)){
+            if (isFromHome){//主页不展示底线,用主页自带的底线
                 bottomLine.setVisibility(View.GONE);
                 return;
             }
@@ -150,6 +164,7 @@ public class FgtTryMakeMoney extends BaseFragment implements TryMakeMoneyContrac
         if (bundle != null) {
             about_to_begin = bundle.getInt("type", 0);
             show_type = bundle.getString("show_type", "");
+            isFromHome = !TextUtils.isEmpty(show_type);
             switch (show_type){
                 case "is_hot":
                     isGetRelease = true;
@@ -204,14 +219,20 @@ public class FgtTryMakeMoney extends BaseFragment implements TryMakeMoneyContrac
         tryMakeMoneyAdp = new TryMakeMoneyAdp(activity);
         tryMakeMoneyAdp.addType(about_to_begin);
         tryMakeMoneyAdp.addShowType(show_type);
-        tryMakeMoneyAdp.setIs_succession(TextUtils.isEmpty(show_type) ? is_succession : 3);
+        tryMakeMoneyAdp.setIs_succession(getIs_succession());
         tryMakeMoneyAdp.addPresenter(presenter);
         for (int i = 0; i < LIST_COUNT; i++) {
             tryMakeMoneyAdp.add(NULL);
         }
         recyclerview.setAdapter(tryMakeMoneyAdp);
 
-        bottomLine = ViewUtil.setBottomLine(recyclerview);
+        bottomLine = ViewUtil.setBottomLine(recyclerview, new Action1<String>() {
+            @Override
+            public void call(String msg) {
+                if (isFromHome)
+                    EventBus.getDefault().post(BigEvent.get().setEventTypes(EventTypes.FGT_SHEEP_FOOT_VIEW_CALL_BACK).setData(msg));
+            }
+        });
 
     }
     private View bottomLine;
@@ -250,7 +271,10 @@ public class FgtTryMakeMoney extends BaseFragment implements TryMakeMoneyContrac
                 }
                 if(noMoreRelease && noMoreReleaseBegin){
                     recyclerview.setNoMore(true);
+                    noMore = true;
                     notifyBottomLine(true);
+                    if (isFromHome)
+                        EventBus.getDefault().post(BigEvent.get().setEventTypes(EventTypes.FGT_SHEEP_SET_BOTTOM_LINE));
                 }
             }
         });
@@ -267,8 +291,14 @@ public class FgtTryMakeMoney extends BaseFragment implements TryMakeMoneyContrac
     //强制刷新数据
     public void refreshData() {
         isFirstCache = false;
+        noMore = false;
+        if (isFromHome)
+            EventBus.getDefault().post(BigEvent.get().setEventTypes(EventTypes.FGT_SHEEP_SET_BOTTOM_LINE));
         releasePage = 1;
         releaseBeginPage = 1;
+        acceptedEtyList.clear();
+        releaseEtyLists.clear();
+        releaseEtyListsBegin.clear();
         mInitData();
     }
 
@@ -292,7 +322,7 @@ public class FgtTryMakeMoney extends BaseFragment implements TryMakeMoneyContrac
             if (isGameTask) {
                 cacheTaskAcceptedEtyList = DataUtil.getInstance().getCacheList(ApiKey.run_game_task, TaskAcceptedEty.class);
             } else {
-                cacheTaskAcceptedEtyList = DataUtil.getInstance().getCacheList(ApiKey.new_run_task(TextUtils.isEmpty(show_type) ? is_succession : 3, 0), TaskAcceptedEty.class);
+                cacheTaskAcceptedEtyList = DataUtil.getInstance().getCacheList(ApiKey.new_run_task(getIs_succession(), 0), TaskAcceptedEty.class);
             }
             if (ListUtil.isEmpty(cacheTaskAcceptedEtyList)) {
                 acceptedEtyList.clear();
@@ -389,9 +419,13 @@ public class FgtTryMakeMoney extends BaseFragment implements TryMakeMoneyContrac
         }
     }
 
+    public int getIs_succession() {
+        return isFromHome ? 3 : is_succession;
+    }
+
     @Override
     public void returnTaskTaskUpdateView(Object object) {
-        boolean isNewData = DataUtil.getInstance().isNewData(isGameTask ? ApiKey.run_game_task : ApiKey.new_run_task(TextUtils.isEmpty(show_type) ? is_succession : 3, 0));
+        boolean isNewData = DataUtil.getInstance().isNewData(isGameTask ? ApiKey.run_game_task : ApiKey.new_run_task(getIs_succession(), 0));
         if (isNewData) {
             if (object instanceof BaseMessage) {
                 List<TaskAcceptedEty> taskAcceptedEty = ((BaseMessage) object).getDataList(TaskAcceptedEty.class);
@@ -421,7 +455,7 @@ public class FgtTryMakeMoney extends BaseFragment implements TryMakeMoneyContrac
      */
     @Override
     public void releaseTaskTaskUpdateView(BaseMessage baseMessage, int about_to_begin) {
-        boolean isNewData = DataUtil.getInstance().isNewData(ApiKey.release_task(about_to_begin == 0 ? releasePage : releaseBeginPage, per_page, about_to_begin, task_type, TextUtils.isEmpty(show_type) ? is_succession : 3));
+        boolean isNewData = DataUtil.getInstance().isNewData(ApiKey.release_task(about_to_begin == 0 ? releasePage : releaseBeginPage, per_page, about_to_begin, task_type, getIs_succession()));
         if (isNewData) {
             List<TaskReleaseEty> releaseEtyList = baseMessage.getDataList(TaskReleaseEty.class);
             switch (about_to_begin) {
@@ -463,7 +497,7 @@ public class FgtTryMakeMoney extends BaseFragment implements TryMakeMoneyContrac
     //从ACache获取发布的任务列表
     private void getReleaseFromACache(int about_to_begin) {
         try {
-            List<TaskReleaseEty> cacheTaskReleaseEtyList = DataUtil.getInstance().getCacheList(ApiKey.release_task(about_to_begin == 0 ? releasePage : releaseBeginPage, per_page, about_to_begin, task_type, TextUtils.isEmpty(show_type) ? is_succession : 3), TaskReleaseEty.class);
+            List<TaskReleaseEty> cacheTaskReleaseEtyList = DataUtil.getInstance().getCacheList(ApiKey.release_task(about_to_begin == 0 ? releasePage : releaseBeginPage, per_page, about_to_begin, task_type, getIs_succession()), TaskReleaseEty.class);
             switch (about_to_begin) {
                 case 0:
                     ListUtil.addAll(releaseEtyLists, cacheTaskReleaseEtyList);
@@ -490,11 +524,16 @@ public class FgtTryMakeMoney extends BaseFragment implements TryMakeMoneyContrac
                                 0,
                                 about_to_begin,
                                 task_type,
-                                TextUtils.isEmpty(show_type) ? is_succession : 3));
+                                getIs_succession()));
         presenter.releaseTask(paramEty);
     }
 
     public int getDataCount() {
         return acceptedEtyList.size() + releaseEtyLists.size() + releaseEtyListsBegin.size();
     }
+
+    private boolean noMore = false;
+    public boolean isNoMore() {
+        return noMore;
+    }
 }

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

@@ -61,6 +61,10 @@ public class FgtWelfareCenter extends BaseFragment{
     RecyclerView wcDownloadWelfareList;
     @BindView(R.id.wc_all_gift)
     TextView wcAllGift;
+    @BindView(R.id.wc_gift_center_title_line)
+    View wc_gift_center_title_line;
+    @BindView(R.id.wc_gift_center_title_container)
+    View wc_gift_center_title_container;
     @BindView(R.id.wc_gift_center_list)
     RecyclerView wcGiftCenterList;
     @BindView(R.id.bottom_line_text)
@@ -157,6 +161,10 @@ public class FgtWelfareCenter extends BaseFragment{
     @Override
     public void onResume() {
         super.onResume();
+        //每次强制刷新
+        refreshHotWelfare = true;
+        refreshDownloadWelfare = true;
+        refreshGiftCenter = true;
         refreshData();
     }
     private boolean refreshHotWelfare = true;
@@ -248,6 +256,8 @@ public class FgtWelfareCenter extends BaseFragment{
     private void notifyDataSetChanged() {
         if(!refreshHotWelfare && !refreshDownloadWelfare && !refreshGiftCenter)
             refresh.setRefreshing(false);
+        wc_gift_center_title_container.setVisibility(giftCenterList.isEmpty() ? View.GONE : View.VISIBLE);
+        wc_gift_center_title_line.setVisibility(giftCenterList.isEmpty() ? View.GONE : View.VISIBLE);
     }
 
     @Override

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

@@ -233,6 +233,7 @@ public class SheepApp extends BaseApplication {
         public void onActivityDestroyed(Activity activity) {
             if(mActivityCount == 0) {
                 LogUtil.println("SheepApp onActivityDestroyed", mActivityCount);
+                DataUtil.getInstance().resetIsNewSmallSheep();
                 stopService(new Intent(SheepApp.this, DownloadService.class));
                 stopService(new Intent(SheepApp.this, FloatService.class));
                 if(DataUtil.IS_USE_SCREEN_SHOT)

+ 1 - 0
app/src/main/java/org/afinal/simplecache/ApiKey.java

@@ -93,5 +93,6 @@ public class ApiKey {
     public static String playGameDetail(int id){
         return "app/find?id="+id;
     }
+    public static final String slideshowGame = "app/game_banner?platform=1";
 
 }

+ 8 - 8
app/src/main/res/drawable/shape_blue_stroke_rectangle_no_lb.xml

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
-    android:shape="rectangle">
-    <corners
-        android:topLeftRadius="10dp"
-        android:topRightRadius="10dp"
-        android:bottomRightRadius="10dp"/>
-    <stroke
-        android:width="1px"
-        android:color="#4889FF" />
+android:shape="rectangle">
+<corners
+    android:topLeftRadius="10dp"
+    android:topRightRadius="10dp"
+    android:bottomRightRadius="10dp"/>
+<stroke
+    android:width="1px"
+    android:color="#4889FF" />
 </shape>

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

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <corners
+        android:topLeftRadius="10dp"
+        android:topRightRadius="10dp"
+        android:bottomRightRadius="10dp"/>
+    <stroke
+        android:width="1px"
+        android:color="#D3AF57" />
+</shape>

+ 55 - 16
app/src/main/res/layout/act_play_game_detail_layout.xml

@@ -3,7 +3,7 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@color/white_light">
+    android:background="@color/txt_white">
 
     <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
         xmlns:app="http://schemas.android.com/apk/res-auto"
@@ -14,12 +14,12 @@
             android:id="@+id/appbar_act_game_details"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:background="@color/white_light"
+            android:background="@color/txt_white"
             android:fitsSystemWindows="true">
 
             <LinearLayout
                 android:layout_width="match_parent"
-                android:layout_height="280dp"
+                android:layout_height="250dp"
                 android:gravity="center_horizontal"
                 android:orientation="vertical"
                 app:expandedTitleTextAppearance="@style/TextAppearance.Design.CollapsingToolbar.Expanded"
@@ -33,14 +33,41 @@
             android:fillViewport="false"
             app:layout_behavior="@string/appbar_scrolling_view_behavior">
 
+            <!--选项卡-->
+
             <LinearLayout
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
+                android:layout_height="match_parent"
                 android:orientation="vertical">
-                <!--选项卡-->
-                <include layout="@layout/tablayout_viewpager_layout" />
-
-                <include layout="@layout/find_item_bottom"/>
+                <View
+                    android:id="@+id/find_information_line"
+                    android:layout_width="match_parent"
+                    android:layout_height="10dp"
+                    android:background="@color/theme_app_divider_color"
+                    android:layout_marginTop="@dimen/content_padding_10"
+                    app:layout_constraintTop_toBottomOf="@+id/find_information_time"/>
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="48dp"
+                    android:background="@color/white"
+                    android:orientation="vertical">
+
+                    <android.support.design.widget.TabLayout
+                        android:id="@+id/tabLayout"
+                        style="@style/style_tab"
+                        app:tabIndicatorHeight="2dp"
+                        android:layout_height="48dp"/>
+                    <include layout="@layout/line_1px_hor" />
+                </LinearLayout>
+
+
+                <com.kfzs.duanduan.view.ViewPagerAutoHeigh
+                    android:id="@+id/viewpager_act_game_details"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:background="@color/white"
+                    app:layout_behavior="@string/appbar_scrolling_view_behavior"
+                    android:layout_marginBottom="@dimen/content_padding_54"/>
             </LinearLayout>
         </android.support.v4.widget.NestedScrollView>
     </android.support.design.widget.CoordinatorLayout>
@@ -125,16 +152,18 @@
         android:id="@+id/ll_game_tag"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="@dimen/find_game_top3"
+        android:layout_marginTop="@dimen/find_game_top165"
+        android:layout_centerHorizontal="true"
         android:orientation="horizontal"/>
 
     <TextView
         android:id="@+id/find_game_info_tv"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="190dp"
+        android:layout_marginTop="@dimen/find_game_top190"
         android:layout_below="@+id/status_height_view"
         android:gravity="center"
+        android:layout_centerHorizontal="true"
         android:text="厂商:网易 | 版本号:7.9"
         android:textColor="@color/black_666666"
         android:textSize="12sp" />
@@ -165,7 +194,7 @@
             android:gravity="center"
             android:padding="@dimen/content_padding_3"
             android:background="@mipmap/welfare_gift_img_bg"
-            android:text="123"
+            android:text=""
             android:textSize="10sp"
             android:textColor="@color/white"/>
         <TextView
@@ -175,15 +204,25 @@
             android:gravity="center"
             android:padding="@dimen/content_padding_3"
             android:background="@mipmap/welfare_gift_img_bg"
-            android:text="123"
+            android:text="礼包"
             android:textSize="10sp"
             android:layout_marginStart="@dimen/content_padding_15"
             android:textColor="@color/white"/>
     </LinearLayout>
-    <TextView
-        android:id="@+id/find_game_down_tv"
-        style="@style/style_button"
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_gravity="bottom"
         android:layout_centerInParent="true"
         android:layout_alignParentBottom="true"
-        android:text="下载" />
+        android:background="@color/white"
+        android:orientation="vertical">
+
+        <include layout="@layout/line_1px_hor" />
+
+        <TextView
+            android:id="@+id/find_game_down_tv"
+            style="@style/style_button"
+            android:text="下载" />
+    </LinearLayout>
 </RelativeLayout>

+ 217 - 0
app/src/main/res/layout/act_play_game_dtail.xml

@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="utf-8"?>
+<com.flipboard.bottomsheet.BottomSheetLayout 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="match_parent"
+    android:fitsSystemWindows="true">
+
+    <android.support.design.widget.CoordinatorLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <android.support.design.widget.AppBarLayout
+            android:id="@+id/appbar_act_game_details"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@color/white_light"
+            android:fitsSystemWindows="true">
+            <!--标题栏-->
+
+
+            <android.support.design.widget.CollapsingToolbarLayout
+                android:id="@+id/toolbar_layout_act_game_details"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:fitsSystemWindows="true"
+                app:contentScrim="?attr/colorPrimary"
+                app:expandedTitleTextAppearance="@style/TextAppearance.Design.CollapsingToolbar.Expanded"
+                app:layout_scrollFlags="scroll|exitUntilCollapsed">
+
+                <!--大图-->
+                <RelativeLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:background="@color/white"
+                    android:fitsSystemWindows="true"
+                    android:gravity="center_horizontal"
+                    app:layout_scrollFlags="scroll|enterAlways">
+
+                    <ImageView
+                        android:id="@+id/find_game_iv"
+                        android:layout_width="@dimen/find_icon_with"
+                        android:layout_height="@dimen/find_icon_with"
+                        android:layout_marginTop="@dimen/find_game_top"
+                        android:src="@drawable/loading_01" />
+
+                    <TextView
+                        android:id="@+id/find_game_name_tv"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/find_game_top2"
+                        android:text="@string/app_name"
+                        android:textColor="@color/title"
+                        android:textSize="16sp" />
+
+                    <LinearLayout
+                        android:id="@+id/ll_game_tag"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/find_game_top3"
+                        android:layout_centerHorizontal="true"
+                        android:orientation="horizontal"/>
+
+                    <TextView
+                        android:id="@+id/find_game_info_tv"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="190dp"
+                        android:gravity="center"
+                        android:layout_centerHorizontal="true"
+                        android:text="厂商:网易 | 版本号:7.9"
+                        android:textColor="@color/black_666666"
+                        android:textSize="12sp" />
+
+                    <android.support.v7.widget.AppCompatRatingBar
+                        android:id="@+id/find_game_xin"
+                        style="@style/style_rating_bar"
+                        android:layout_width="wrap_content"
+                        android:layout_marginTop="@dimen/find_game_top210"
+                        android:layout_centerHorizontal="true"
+                        android:isIndicator="true"
+                        android:numStars="5"
+                        android:rating="1.5"
+                        android:stepSize="0.5" />
+
+                    <LinearLayout
+                        android:id="@+id/welfare_gift_layout"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_centerHorizontal="true"
+                        android:layout_marginTop="@dimen/find_game_top6"
+                        android:orientation="horizontal">
+                        <TextView
+                            android:id="@+id/welfare_tv"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:gravity="center"
+                            android:padding="@dimen/content_padding_3"
+                            android:background="@mipmap/welfare_gift_img_bg"
+                            android:text="123"
+                            android:textSize="10sp"
+                            android:textColor="@color/white"/>
+                        <TextView
+                            android:id="@+id/gift_tv"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:gravity="center"
+                            android:padding="@dimen/content_padding_3"
+                            android:background="@mipmap/welfare_gift_img_bg"
+                            android:text="礼包"
+                            android:textSize="10sp"
+                            android:layout_marginStart="@dimen/content_padding_15"
+                            android:textColor="@color/white"/>
+                    </LinearLayout>
+                </RelativeLayout>
+
+                <android.support.v7.widget.Toolbar
+                    android:id="@+id/toolbar_act_game_details"
+                    android:layout_width="match_parent"
+                    android:layout_height="?attr/actionBarSize"
+                    app:contentInsetStart="0dp"
+                    app:layout_collapseMode="pin"
+                    app:layout_scrollFlags="scroll|exitUntilCollapsed"
+                    app:title="Toolbar"
+                    app:titleTextColor="@color/white">
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="?attr/actionBarSize"
+                        android:gravity="center_vertical"
+                        android:orientation="horizontal"
+                        android:paddingLeft="0dp">
+
+                        <ImageView
+                            android:id="@+id/img_baseactivity_title"
+                            android:layout_width="wrap_content"
+                            android:layout_height="match_parent"
+                            android:paddingEnd="@dimen/content_padding"
+                            android:paddingStart="@dimen/content_padding"
+                            android:scaleType="centerInside"
+                            android:src="@drawable/narrow_back_black" />
+
+                        <TextView
+                            android:id="@+id/txt_baseactivity_title"
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_weight="1"
+                            android:ellipsize="end"
+                            android:gravity="center"
+                            android:text="游戏标题"
+                            android:textColor="@color/black_text_deep"
+                            android:textSize="@dimen/text_size_4"/>
+
+                        <ImageView
+                            android:id="@+id/ibtn_baseactivity_right"
+                            android:layout_width="wrap_content"
+                            android:layout_height="match_parent"
+                            android:paddingEnd="@dimen/content_padding"
+                            android:paddingStart="@dimen/content_padding"
+                            android:background="@color/translate"
+                            android:src="@mipmap/share"
+                            android:gravity="center"
+                            android:visibility="invisible"/>
+                    </LinearLayout>
+                </android.support.v7.widget.Toolbar>
+            </android.support.design.widget.CollapsingToolbarLayout>
+            <!--选项卡-->
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="48dp"
+                android:background="@color/white"
+                android:orientation="vertical">
+
+                <android.support.design.widget.TabLayout
+                    android:id="@+id/tabLayout"
+                    style="@style/style_tab"
+                    app:tabIndicatorHeight="2dp"
+                    android:layout_height="48dp"/>
+                <include layout="@layout/line_1px_hor" />
+            </LinearLayout>
+
+        </android.support.design.widget.AppBarLayout>
+
+        <android.support.v4.widget.NestedScrollView
+            android:id="@+id/nestedScrollView"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginBottom="48dp"
+            android:background="@color/white"
+            android:fillViewport="false"
+            app:layout_behavior="@string/appbar_scrolling_view_behavior">
+
+            <com.kfzs.duanduan.view.ViewPagerAutoHeigh
+                android:id="@+id/viewpager_act_game_details"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content" />
+
+        </android.support.v4.widget.NestedScrollView>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_gravity="bottom"
+            android:background="@color/white"
+            android:orientation="vertical">
+
+            <include layout="@layout/line_1px_hor" />
+
+            <TextView
+                android:id="@+id/find_game_down_tv"
+                style="@style/style_button"
+                android:layout_centerInParent="true"
+                android:layout_alignParentBottom="true"
+                android:text="下载" />
+        </LinearLayout>
+
+    </android.support.design.widget.CoordinatorLayout>
+</com.flipboard.bottomsheet.BottomSheetLayout>

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

@@ -47,7 +47,7 @@
     <LinearLayout
         android:id="@+id/order_layout"
         style="@style/style_item_container"
-        android:visibility="gone">
+        android:visibility="visible">
 
         <ImageView
             style="@style/style_item_img"

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

@@ -69,7 +69,7 @@
             <!--选项卡-->
             <include layout="@layout/tablayout_viewpager_layout" />
 
-            <include layout="@layout/find_item_bottom"/>
+            <!--<include layout="@layout/find_item_bottom"/>-->
         </LinearLayout>
 
     </android.support.v4.widget.NestedScrollView>

+ 7 - 11
app/src/main/res/layout/fgt_try_makemoney_layout.xml

@@ -3,22 +3,18 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:paddingBottom="@dimen/content_padding_10"
-    android:paddingStart="4dp"
-    android:paddingEnd="4dp">
+    android:paddingEnd="4dp"
+    android:paddingStart="4dp">
 
     <include
         android:id="@+id/empty_view"
         layout="@layout/empty_view"
         android:layout_width="match_parent"
         android:layout_height="match_parent" />
-    <!--<com.sheep.gamegroup.view.customview.SheepmSwipeRefreshLayout-->
-        <!--android:id="@+id/refresh"-->
-        <!--android:layout_width="match_parent"-->
-        <!--android:layout_height="wrap_content">-->
 
-        <com.jcodecraeer.xrecyclerview.XRecyclerView
-            android:id="@+id/recyclerview"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent" />
-    <!--</com.sheep.gamegroup.view.customview.SheepmSwipeRefreshLayout>-->
+    <com.jcodecraeer.xrecyclerview.XRecyclerView
+        android:id="@+id/recyclerview"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:descendantFocusability="blocksDescendants" />
 </RelativeLayout>

+ 4 - 1
app/src/main/res/layout/fgt_welfare_center.xml

@@ -51,11 +51,14 @@
                 android:layout_height="wrap_content" />
 
             <View
+                android:id="@+id/wc_gift_center_title_line"
                 android:layout_width="match_parent"
                 android:layout_height="10dp"
                 android:background="#fff5f5f5" />
 
-            <RelativeLayout style="@style/style_wc_rl">
+            <RelativeLayout
+                android:id="@+id/wc_gift_center_title_container"
+                style="@style/style_wc_rl">
 
                 <TextView
                     style="@style/style_wc_line_title"

+ 11 - 0
app/src/main/res/layout/game_tag_textview.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal">
+    <TextView
+        android:id="@+id/user_label_tv"
+        style="@style/style_check_stroke"
+        android:text="小标签" />
+
+</LinearLayout>

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

@@ -124,7 +124,7 @@
             android:gravity="center"
             android:text="+10元"
             android:textColor="@color/txt_red"
-            android:textSize="15sp"
+            android:textSize="12sp"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintTop_toTopOf="parent" />
 

+ 31 - 7
app/src/main/res/layout/item_play_game_detail.xml

@@ -13,7 +13,7 @@
 
         <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
+            android:layout_height="wrap_content"
             android:orientation="vertical"
             android:layout_margin="@dimen/dp_10"
             android:padding="@dimen/content_padding_20"
@@ -46,8 +46,9 @@
         </LinearLayout>
 
         <LinearLayout
+            android:id="@+id/receive_step_layout"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
+            android:layout_height="wrap_content"
             android:orientation="vertical"
             android:layout_margin="@dimen/dp_10"
             android:padding="@dimen/content_padding_20"
@@ -78,6 +79,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginBottom="@dimen/content_padding_15"
+                android:layout_marginTop="@dimen/content_padding_15"
                 android:layout_marginStart="@dimen/content_padding_15"
                 android:divider="@null"
                 android:listSelector="@color/transparent"
@@ -85,8 +87,9 @@
         </LinearLayout>
 
         <LinearLayout
+            android:id="@+id/progress_title_layout"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
+            android:layout_height="wrap_content"
             android:orientation="vertical"
             android:layout_margin="@dimen/dp_10"
             android:padding="@dimen/content_padding_20"
@@ -112,11 +115,32 @@
 
             </LinearLayout>
 
-            <TextView
-                android:layout_width="wrap_content"
+            <LinearLayout
+                android:id="@+id/progress_value_layout"
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:text="进度条"/>
-
+                android:orientation="horizontal">
+                <ProgressBar
+                    android:max="100"
+                    android:progress="50"
+                    android:id="@+id/progressBarHorizontal"
+                    style="?android:attr/progressBarStyleHorizontal"
+                    android:layout_width="0dp"
+                    android:layout_weight="1"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:layout_marginStart="@dimen/content_padding_5"
+                    android:layout_marginEnd="@dimen/content_padding_5"/>
+                <TextView
+                    android:id="@+id/last_num_tv"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="#333333"
+                    android:text=""
+                    android:layout_marginStart="@dimen/content_padding_5"
+                    android:textSize="14sp"
+                    android:layout_gravity="center"/>
+            </LinearLayout>
 
         </LinearLayout>
 </LinearLayout>

+ 2 - 37
app/src/main/res/layout/play_game_vertical_list_item.xml

@@ -96,47 +96,12 @@
                 android:layout_weight="1" />
 
             <LinearLayout
+                android:id="@+id/ll_game_tag"
                 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" />
+                android:orientation="horizontal"/>
 
-                <TextView
-                    android:id="@+id/item_num_tv1"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="@dimen/content_padding"
-                    android:text=""
-                    android:textColor="#cc8e8e8e"
-                    android:textSize="10sp"
-                    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:text=""
-                    android:textColor="#cc8e8e8e"
-                    android:textSize="10sp"
-                    android:visibility="gone" />
-                <TextView
-                    android:id="@+id/item_num_tv3"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="@dimen/content_padding"
-                    android:text=""
-                    android:textColor="#cc8e8e8e"
-                    android:textSize="10sp"
-                    android:visibility="gone" />
-            </LinearLayout>
 
         </LinearLayout>
 

+ 1 - 0
app/src/main/res/layout/user_label.xml

@@ -2,4 +2,5 @@
 <TextView xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/user_label_tv"
     style="@style/style_check_stroke"
+    android:layout_marginRight="@dimen/content_padding_3"
     android:text="小标签" />

+ 5 - 0
app/src/main/res/values/common.xml

@@ -97,8 +97,13 @@
     <dimen name="find_icon_with">70dp</dimen>
     <dimen name="find_game_top">68dp</dimen>
     <dimen name="find_game_top2">144dp</dimen>
+    <dimen name="find_game_top158">158dp</dimen>
+    <dimen name="find_game_top165">165dp</dimen>
     <dimen name="find_game_top3">172dp</dimen>
+    <dimen name="find_game_top190">190dp</dimen>
+    <dimen name="find_game_top200">200dp</dimen>
     <dimen name="find_game_top210">210dp</dimen>
+    <dimen name="find_game_top220">220dp</dimen>
     <dimen name="find_game_top4">230dp</dimen>
     <dimen name="find_game_top5">228dp</dimen>
     <dimen name="find_game_top6">234dp</dimen>