Explorar o código

修复发现模块中存在的bug

zengjiebin %!s(int64=7) %!d(string=hai) anos
pai
achega
385941dbec
Modificáronse 35 ficheiros con 192 adicións e 105 borrados
  1. 3 0
      app/src/main/java/com/kfzs/duanduan/fragment/FgtFind.java
  2. 17 0
      app/src/main/java/com/kfzs/duanduan/fragment/FgtFindChild.java
  3. 1 1
      app/src/main/java/com/kfzs/duanduan/react/MainTab.java
  4. 6 10
      app/src/main/java/com/kfzs/duanduan/react/TabsHelper.java
  5. 5 0
      app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java
  6. 4 0
      app/src/main/java/com/sheep/gamegroup/util/FindAppHelper.java
  7. 3 0
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  8. 27 17
      app/src/main/java/com/sheep/gamegroup/util/TaskHelper.java
  9. 24 5
      app/src/main/java/com/sheep/gamegroup/util/UMConfigUtils.java
  10. 9 3
      app/src/main/java/com/sheep/gamegroup/view/activity/ActFindGame.java
  11. 6 3
      app/src/main/java/com/sheep/gamegroup/view/activity/ActFindInformation.java
  12. 28 7
      app/src/main/java/com/sheep/gamegroup/view/activity/ActMyMoney.java
  13. 9 5
      app/src/main/java/com/sheep/gamegroup/view/activity/ActReservation.java
  14. 5 5
      app/src/main/java/com/sheep/gamegroup/view/activity/SplashAct.java
  15. BIN=BIN
      app/src/main/res/drawable-xhdpi/tab_class.webp
  16. BIN=BIN
      app/src/main/res/drawable-xhdpi/tab_class_click.webp
  17. BIN=BIN
      app/src/main/res/drawable-xhdpi/tab_game.webp
  18. BIN=BIN
      app/src/main/res/drawable-xhdpi/tab_game_click.webp
  19. BIN=BIN
      app/src/main/res/drawable-xxhdpi/tab_class.webp
  20. BIN=BIN
      app/src/main/res/drawable-xxhdpi/tab_class_click.webp
  21. BIN=BIN
      app/src/main/res/drawable-xxhdpi/tab_find.png
  22. BIN=BIN
      app/src/main/res/drawable-xxhdpi/tab_find_click.png
  23. BIN=BIN
      app/src/main/res/drawable-xxhdpi/tab_game.webp
  24. BIN=BIN
      app/src/main/res/drawable-xxhdpi/tab_game_click.webp
  25. 0 8
      app/src/main/res/drawable/drawable_selector_class.xml
  26. 8 0
      app/src/main/res/drawable/drawable_selector_find.xml
  27. 0 8
      app/src/main/res/drawable/drawable_selector_game.xml
  28. 6 7
      app/src/main/res/layout/act_find_game.xml
  29. 2 2
      app/src/main/res/layout/activity_main.xml
  30. 2 3
      app/src/main/res/layout/find_information_bottom_item.xml
  31. 3 2
      app/src/main/res/layout/find_item.xml
  32. 4 4
      app/src/main/res/layout/find_reservation_item.xml
  33. 11 2
      app/src/main/res/layout/find_reservation_item_bottom.xml
  34. 4 8
      app/src/main/res/values/dd_styles.xml
  35. 5 5
      app/src/main/res/values/str_network_strings.xml

+ 3 - 0
app/src/main/java/com/kfzs/duanduan/fragment/FgtFind.java

@@ -24,6 +24,8 @@ import butterknife.ButterKnife;
 import rx.android.schedulers.AndroidSchedulers;
 import rx.schedulers.Schedulers;
 
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.FIND_TAG;
+
 /**
  * Created by realicing on 2018/6/27.
  * realicing@sina.com
@@ -87,6 +89,7 @@ public class FgtFind extends BaseCompatFragment {
             @Override
             public void onPageSelected(int i) {
                 position = i;
+                FIND_TAG.onEvent("find_tag_name", ListUtil.hasIndex(list, i - 1) ? list.get(i - 1).getName() : "全部");
             }
 
             @Override

+ 17 - 0
app/src/main/java/com/kfzs/duanduan/fragment/FgtFindChild.java

@@ -58,6 +58,7 @@ import rx.schedulers.Schedulers;
 
 import static android.content.Intent.ACTION_PACKAGE_ADDED;
 import static android.content.Intent.ACTION_PACKAGE_REMOVED;
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.FIND_ITEM;
 
 /**
  * Created by realicing on 2018/6/27.
@@ -146,6 +147,7 @@ public class FgtFindChild extends BaseCompatFragment {
 
                 if(item.isGame()){
                     find_item_download.setVisibility(View.VISIBLE);
+                    find_item_pf_label.setVisibility(View.VISIBLE);
                     find_item_pf_label.setText(Html.fromHtml(String.format(Locale.CHINA, "评分:<font color='%s'>%.1f</font>", "#29d6fd", item.getScore())));
                     FindApp findApp = item.getApplication();
                     updateView(activity, findApp, find_item_download);
@@ -205,6 +207,21 @@ public class FgtFindChild extends BaseCompatFragment {
                     openHomeListItem(item);
                     break;
             }
+            FIND_ITEM.onEvent("find_id", item.getId());
+            SheepApp.getInstance().getNetComponent().getApiService().getFindItemAddClicks(item.getId())
+                        .subscribeOn(Schedulers.io())
+                        .observeOn(AndroidSchedulers.mainThread())
+                        .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                            @Override
+                            public void onNext(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
+                            }
+
+                            @Override
+                            public void onError(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
+                            }
+                        });
         }
     }
 

+ 1 - 1
app/src/main/java/com/kfzs/duanduan/react/MainTab.java

@@ -54,7 +54,7 @@ public enum MainTab {
 
         @Override
         public int getDrawableId() {
-            return R.drawable.drawable_selector_class;
+            return R.drawable.drawable_selector_find;
         }
     },
     FgtPersonnalCenter(R.string.personal_center) {

+ 6 - 10
app/src/main/java/com/kfzs/duanduan/react/TabsHelper.java

@@ -134,16 +134,12 @@ public class TabsHelper {
      * @param position
      */
     private void checkWhichPage(int position){
-        /*if(position == MainTab.FgtMainGame.ordinal()) {
-            UMConfigUtils.onEvent(UMConfigUtils.Event.TAB_GAME);
-        }else if(position == MainTab.FgtMainCategory.ordinal()) {
-            UMConfigUtils.onEvent(UMConfigUtils.Event.TAB_CATEGORY);
-        }else */if(position == MainTab.FgtSmallSheep.ordinal()) {
-            UMConfigUtils.onEvent(UMConfigUtils.Event.TAB_SHEEP);
-//        }else if(position == MainTab.Bp.ordinal()) {
-//            UMConfigUtils.onEvent(UMConfigUtils.Event.TAB_JIEZHEWAN);
-//        }else if(position == MainTab.CreditCard.ordinal()) {
-//            UMConfigUtils.onEvent(UMConfigUtils.Event.TAB_CREDITCARD);
+        if(position == MainTab.FgtSmallSheep.ordinal()) {
+            UMConfigUtils.Event.TAB_SHEEP.onEvent();
+        }else if(position == MainTab.Fgt_Find.ordinal()) {
+            UMConfigUtils.Event.TAB_FIND.onEvent();
+        }else if(position == MainTab.FgtPersonnalCenter.ordinal()) {
+            UMConfigUtils.Event.TAB_USER.onEvent();
         }
     }
 

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

@@ -635,6 +635,11 @@ public interface ApiService {
     @GET("app/find/applications/downloads_list")
     Observable<BaseMessage> getFindAppReservationList(@Query("page") int page, @Query("per_page") int per_page);
     /**
+     * 发现点击统计
+     */
+    @GET("app/find/add_clicks")
+    Observable<BaseMessage> getFindItemAddClicks(@Query("id") int id);
+    /**
      * 首页list
      */
     @GET("app/home_list/{id}")

+ 4 - 0
app/src/main/java/com/sheep/gamegroup/util/FindAppHelper.java

@@ -34,6 +34,8 @@ import rx.android.schedulers.AndroidSchedulers;
 import rx.functions.Action1;
 import rx.schedulers.Schedulers;
 
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.FIND_APP;
+
 /**
  * Created by realicing on 2018/6/29.
  * realicing@sina.com
@@ -70,6 +72,7 @@ public class FindAppHelper {
                     recordAppDownloads(activity, findApp, down_tv);
                 }
                 downloadApp(activity, findApp);
+                FIND_APP.onEvent("application_id", findApp.getId(), "action", down_tv.getText());
             }
         });
     }
@@ -145,6 +148,7 @@ public class FindAppHelper {
             reservation_tv.setOnClickListener(new View.OnClickListener() {
                 @Override
                 public void onClick(View view) {
+                    FIND_APP.onEvent("application_id", findApp.getId(), "action", "预约下载");
                     reservation_tv.setEnabled(false);
                     recordAppDownloads(activity, findApp, reservation_tv);
                 }

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

@@ -113,6 +113,8 @@ import rx.android.schedulers.AndroidSchedulers;
 import rx.functions.Action1;
 import rx.schedulers.Schedulers;
 
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_FIND_APP_ORDER;
+
 /**
  * Created by ljy on 2018/3/18.
  */
@@ -1384,6 +1386,7 @@ public class Jump2View {
     public void goActReservation(Activity activity) {
         Intent intent = new Intent(activity, ActReservation.class);
         activity.startActivity(intent);
+        USER_FIND_APP_ORDER.onEvent();
     }
 
     public void tryShare(Activity activity, String shareUrlKey, String idName, int id) {

+ 27 - 17
app/src/main/java/com/sheep/gamegroup/util/TaskHelper.java

@@ -24,6 +24,8 @@ import rx.android.schedulers.AndroidSchedulers;
 import rx.functions.Action1;
 import rx.schedulers.Schedulers;
 
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.FIND_TASK;
+
 /**
  * Created by realicing on 2018/7/3.
  * realicing@sina.com
@@ -96,9 +98,9 @@ public class TaskHelper {
         TextView find_information_game_task = (TextView)itemView.findViewById(R.id.find_information_game_task);
         final TextView find_information_game_task_end_time = (TextView)itemView.findViewById(R.id.find_information_game_task_end_time);
         ViewUtil.setImage(find_information_game_icon, taskEty.getIcon());
-        ViewUtil.setText(find_information_game_name, taskEty.getName());
+        ViewUtil.setText(find_information_game_name, taskReleaseEty.getName());
         ViewUtil.setText(find_information_game_surplus, String.format(Locale.CHINA, "剩余%s份", taskReleaseEty.getLast_num()));
-        ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "截止日期:%s", TimeUtil.TimeStamp2Date(NumberFormatUtils.parseLong(taskReleaseEty.getDeadline()), "yyyy/MM/dd\tHH:mm")));
+        ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "截止日期:%s", taskReleaseEty.getDeadline().equals("永久") ? taskReleaseEty.getDeadline() : TimeUtil.TimeStamp2Date(NumberFormatUtils.parseLong(taskReleaseEty.getDeadline()), "yyyy/MM/dd HH:mm")));
         ViewUtil.setText(find_information_game_yuan, String.format(Locale.CHINA, "+%s元", taskReleaseEty.getBonus()));
         find_information_game_yuan.setVisibility(View.VISIBLE);
         if(taskAcceptedEty != null){
@@ -106,27 +108,29 @@ public class TaskHelper {
                 case 1://"已接受任务";
                 case 2:// "正在进行中";
                     find_information_game_task_end_time.setVisibility(View.VISIBLE);
-                    find_information_game_task_end_time.setText(TimeUtil.getHours(taskAcceptedEty.getEnd_time() * 1000));
-                    timer = RxjavaCountDownTimer.getInstance(taskAcceptedEty.getEnd_time())
-                            .setOnTickListener(new RxjavaCountDownTimer.OnTickListener() {
-                                @Override
-                                public void onFinish() {
-                                    find_information_game_task_end_time.setVisibility(View.GONE);
-                                    refreshTask();
-                                }
-
-                                @Override
-                                public void onTicker(long time) {
-                                    find_information_game_task_end_time.setText(TimeUtil.getHours(time * 1000));
-                                }
-                            }).start();
+                    if(!taskReleaseEty.getDeadline().equals("永久")){
+                        find_information_game_task_end_time.setText(TimeUtil.getHours(taskAcceptedEty.getEnd_time() * 1000));
+                        timer = RxjavaCountDownTimer.getInstance(taskAcceptedEty.getEnd_time())
+                                .setOnTickListener(new RxjavaCountDownTimer.OnTickListener() {
+                                    @Override
+                                    public void onFinish() {
+                                        find_information_game_task_end_time.setVisibility(View.GONE);
+                                        refreshTask();
+                                    }
 
+                                    @Override
+                                    public void onTicker(long time) {
+                                        find_information_game_task_end_time.setText(TimeUtil.getHours(time * 1000));
+                                    }
+                                }).start();
+                    }
                     find_information_game_task.setText("取消任务");
                     find_information_game_task.setEnabled(true);
                     find_information_game_task.setOnClickListener(new View.OnClickListener() {
                         @Override
                         public void onClick(View view) {
-                            SheepApp.getInstance().getNetComponent().getApiService().giveUpTask(taskReleaseEty.getId())
+                            FIND_TASK.onEvent("release_task_id", release_task_id, "action", "取消任务");
+                            SheepApp.getInstance().getNetComponent().getApiService().giveUpTask(taskAcceptedEty.getId())
                                             .subscribeOn(Schedulers.io())
                                             .observeOn(AndroidSchedulers.mainThread())
                                             .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
@@ -183,6 +187,11 @@ public class TaskHelper {
             find_information_game_task.setVisibility(View.VISIBLE);
             find_information_game_task.setText("已经下线");
             find_information_game_task.setEnabled(false);
+        } else if("0".equals(taskReleaseEty.getLast_num())){
+            find_information_game_task_end_time.setVisibility(View.GONE);
+            find_information_game_task.setVisibility(View.VISIBLE);
+            find_information_game_task.setText("任务已抢光");
+            find_information_game_task.setEnabled(false);
         } else {
             find_information_game_task_end_time.setVisibility(View.GONE);
             find_information_game_task.setVisibility(View.VISIBLE);
@@ -196,6 +205,7 @@ public class TaskHelper {
                     taskEty.setName(taskReleaseEty.getName());
                     taskEty.setAcceptedTaskId(taskReleaseEty.getAccepted_task_id());
                     Jump2View.getInstance().goDialogActivityView(activity, taskEty);
+                    FIND_TASK.onEvent("release_task_id", release_task_id, "action", "领取任务");
                 }
             });
         }

+ 24 - 5
app/src/main/java/com/sheep/gamegroup/util/UMConfigUtils.java

@@ -13,6 +13,7 @@ import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 //import com.umeng.analytics.MobclickAgent;
 
+import java.util.HashMap;
 import java.util.Map;
 
 import rx.android.schedulers.AndroidSchedulers;
@@ -30,11 +31,11 @@ public class UMConfigUtils {
     public enum  Event{
         GAME_DOWNLOAD                        ("GameDownload"),//游戏下载次数 5001
         BANNER_CLICK_HORIZONTAL              ("BannerClickHorizontal"),//轮播图 广告点击次数 5002
-        TAB_GAME                             ,//游戏页签 5003
-        TAB_CATEGORY                         , //分类页签 5004
-        TAB_SHEEP                            ,//小绵羊页签 5005
-        TAB_JIEZHEWAN                        ,//借着玩页签 5006
-        TAB_CREDITCARD                       ,//信用卡页签,(界面已经没有显示了) 5007
+        TAB_GAME                             ,//主页tab中的游戏页签 5003 注:!!!!!界面已经没有显示了!!!!!
+        TAB_CATEGORY                         , //主页tab中的分类页签 5004 注:!!!!!界面已经没有显示了!!!!!
+        TAB_SHEEP                            ,//主页tab中的小绵羊页签 5005
+        TAB_JIEZHEWAN                        ,//主页tab中的借着玩页签 5006 注:!!!!!界面已经没有显示了!!!!!
+        TAB_CREDITCARD                       ,//信用卡页签 5007 注:!!!!!界面已经没有显示了!!!!!
         SHEEP_TASK_TRY                       ,//试玩赚钱 5008
         SHEEP_TASK_INVITE                    ,//邀请赚钱 5009
         SHEEP_TASK_LIE                       ,//躺着赚钱 5010
@@ -82,6 +83,16 @@ public class UMConfigUtils {
         XIANWAN_WEBVIEW           ,//闲玩 5052
         ORDER_MANAGER           ,//订单管理 5053
         USER_AUTHENTICATION_ENTER           ,//进入实名认证界面 5054
+        TAB_USER           ,//点击主页tab中的个人中心模块 5055
+        TAB_FIND           ,//点击主页tab中的发现模块 5056
+        FIND_TAG           ,//点击发现模块上面的标签 5057 需要传标签id到substring中,如:{"find_tag_name": "全部}
+        FIND_ITEM           ,//点击发现模块中列表里面的一个单项 5058 需要传发现项的id到substring中,如:{"find_id": 1}
+        FIND_APP           ,//点击下载或者预约、取消预约等 发现模块中的一个游戏或者应用 5059 需要传发现App的id和操作到substring中,如:{"application_id": 1, "action", "开始下载"}
+        FIND_SHARE           ,//点击发现详情中的分享 5060 需要传发现项的id或者application_id到substring中,如:{"find_id": 1}或{"application_id": 1}
+        FIND_TASK           ,//领取任务或者取消任务 5061 需要传任务的id和操作到substring中,如:{"release_task_id":1,"action":"领取任务"}或{"release_task_id":1,"action":"取消任务"}
+        FIND_SCORE           ,//评分或者重新评分 5062 需要传发现app的id到substring中,如:{"application_id": 1}
+        USER_FIND_APP_ORDER           ,//点击个人中心中的游戏预约 5063
+        MY_MONEY_TAB           ,//点击我的资产中的tab 5064 需要传点击的tab对应的名字:充值记录、提现记录、收支明细,如:{"tab_name": "充值记录"}或{"tab_name": "提现记录"}或{"tab_name": "收支明细"}
         ;
         private String key;
         Event(String key){
@@ -107,6 +118,14 @@ public class UMConfigUtils {
         public void onEvent(Map<String, String> map){
             UMConfigUtils.onEvent(this, map);
         }
+        public void onEvent(Object...items){
+            Map<String, String> map = new HashMap<>();
+            for (int i = 0; i < items.length; ) {
+                map.put(items[i].toString(), items[i + 1].toString());
+                i += 2;
+            }
+            UMConfigUtils.onEvent(this, map);
+        }
 
         public static void println() {
             Event[] items = Event.values();

+ 9 - 3
app/src/main/java/com/sheep/gamegroup/view/activity/ActFindGame.java

@@ -68,6 +68,8 @@ import rx.schedulers.Schedulers;
 
 import static android.content.Intent.ACTION_PACKAGE_ADDED;
 import static android.content.Intent.ACTION_PACKAGE_REMOVED;
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.FIND_SCORE;
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.FIND_SHARE;
 
 /**
  * Created by realicing on 2018/5/10.
@@ -96,7 +98,8 @@ public class ActFindGame extends BaseActivity {
                 .setRightImgBotton(this, R.mipmap.share, new View.OnClickListener() {
                     @Override
                     public void onClick(View view) {
-                        Jump2View.getInstance().tryShare(ActFindGame.this, "find_share_url", "find_id", id);
+                        FIND_SHARE.onEvent("application_id", id);
+                        Jump2View.getInstance().tryShare(ActFindGame.this, "find_share_url", "application_id", id);
                     }
                 });
 
@@ -135,7 +138,9 @@ public class ActFindGame extends BaseActivity {
                 find_game_name_tv.setLayoutParams(layoutParams2);
                 //信息位置变化
                 RelativeLayout.LayoutParams layoutParams3 = (RelativeLayout.LayoutParams) find_game_info_tv.getLayoutParams();
-                layoutParams3.leftMargin = Math.max(titleWidth + row + 2 * topRow, (G.WIDTH - find_game_info_tv.getWidth()) / 2 + verticalOffset);
+                int left1 = (G.WIDTH - find_game_info_tv.getWidth()) / 2;
+                int left2 = titleWidth + row + 2 * topRow;
+                layoutParams3.leftMargin = 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);
                 find_game_info_tv.setLayoutParams(layoutParams3);
                 //下载按钮位置变化
@@ -441,7 +446,7 @@ public class ActFindGame extends BaseActivity {
     TextView find_game_user_commit_tv;
 
     private void loadUserInfo(final UserEntity userEntity) {
-        GlideImageLoader.circleImage(find_game_user_iv, userEntity.getAvatar());
+        GlideImageLoader.circleImage(find_game_user_iv, userEntity.getAvatar(), R.drawable.icon);
         ViewUtil.setText(find_game_user_name_tv, userEntity.getNickname());
         find_game_user_commit_tv.setOnClickListener(new View.OnClickListener() {
             @Override
@@ -463,6 +468,7 @@ public class ActFindGame extends BaseActivity {
      * @param score 要提交的分数
      */
     private void commitMyAppScore(int score) {
+        FIND_SCORE.onEvent("application_id", id);
         JSONObject jsonObject = new JSONObject();
         jsonObject.put("application_id", id);
         jsonObject.put("score", score);

+ 6 - 3
app/src/main/java/com/sheep/gamegroup/view/activity/ActFindInformation.java

@@ -61,6 +61,7 @@ import rx.schedulers.Schedulers;
 
 import static android.content.Intent.ACTION_PACKAGE_ADDED;
 import static android.content.Intent.ACTION_PACKAGE_REMOVED;
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.FIND_SHARE;
 
 /**
  * Created by realicing on 2018/5/10.
@@ -93,6 +94,7 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
                 .setRightImgBotton(this, R.mipmap.share, new View.OnClickListener() {
                     @Override
                     public void onClick(View view) {
+                        FIND_SHARE.onEvent("find_id", id);
                         Jump2View.getInstance().tryShare(ActFindInformation.this,"find_share_url", "find_id", id);
                     }
                 });
@@ -145,7 +147,7 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
         TextView find_information_time = (TextView)itemView.findViewById(R.id.find_information_time);
         TextView find_information_look = (TextView)itemView.findViewById(R.id.find_information_look);
         ViewUtil.setText(find_information_name, findItem.getTitle());
-        ViewUtil.setText(find_information_time, String.format(Locale.CHINA, "发布时间:%s", TimeUtil.TimeStamp2Date(findItem.getCreated_at(), "yyyy-MM-dd\tHH:mm")));
+        ViewUtil.setText(find_information_time, String.format(Locale.CHINA, "发布时间:%s", TimeUtil.TimeStamp2Date(findItem.getCreated_at(), "yyyy-MM-dd HH:mm")));
         ViewUtil.setText(find_information_look, findItem.getClicks());
 
         WebView find_information_content_wb = itemView.findViewById(R.id.find_information_content_wb);
@@ -180,9 +182,9 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
         final boolean isNeedReservation = !findApp.isCanDonload();//这里认为只有两种状态:可下载与预约下载
         ViewUtil.setText(find_information_game_surplus);
         if(isNeedReservation)
-            ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "开放时间:%s", TimeUtil.TimeStamp2Date(findApp.getDownload_at(), "yyyy-MM-dd\tHH:mm")));
+            ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "开放时间:%s", TimeUtil.TimeStamp2Date(findApp.getDownload_at(), "yyyy-MM-dd HH:mm")));
         else
-            ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "厂商:%s \n包体大小:%sM", findApp.getManufacturer(),findApp.getPackage_size()));
+            ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "厂商:%s 包体大小:%sM", findApp.getManufacturer(),findApp.getPackage_size()));
         find_information_game_yuan.setVisibility(View.GONE);
 
         updateView(this,findApp, find_information_game_task);
@@ -216,6 +218,7 @@ public class ActFindInformation extends BaseActivity implements Action1<Integer>
                 }
             }
         });
+        taskHelper.clear();
         SheepApp.getInstance().getNetComponent().getApiService().getFindDetail(id)
                         .subscribeOn(Schedulers.io())
                         .observeOn(AndroidSchedulers.mainThread())

+ 28 - 7
app/src/main/java/com/sheep/gamegroup/view/activity/ActMyMoney.java

@@ -28,11 +28,16 @@ import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import butterknife.BindView;
 import butterknife.OnClick;
 import rx.android.schedulers.AndroidSchedulers;
 import rx.schedulers.Schedulers;
 
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.MY_MONEY_TAB;
+
 /**
  * 我的资产
  * Created by realicing on 2018/5/8.
@@ -72,26 +77,42 @@ public class ActMyMoney extends BaseActivity {
     protected int getLayoutId() {
         return R.layout.act_my_money;
     }
-
+    public static final String[] tabNames = {"充值记录", "提现记录", "收支明细"};
     @Override
     public void initView() {
         TitleBarUtils.getInstance()
                 .setTitle(this,"我的资产")
                 .setTitleFinish(this);
         mAdapter = new GiftpackListAdapter(getSupportFragmentManager(), getApplicationContext());
-        mAdapter.add(new FgtMyMoney1(), "充值记录");
-        mAdapter.add(new FgtMyMoney2(), "提现记录");
-        mAdapter.add(new FgtMyMoney3(), "消费记录");
+        mAdapter.add(new FgtMyMoney1(), tabNames[0]);
+        mAdapter.add(new FgtMyMoney2(), tabNames[1]);
+        mAdapter.add(new FgtMyMoney3(), tabNames[2]);
         pager.setAdapter(mAdapter);
         new_tab();
     }
     private void new_tab(){
-        indicator.addTab(indicator.newTab().setCustomView(tab_icon("充值记录", true)));
-        indicator.addTab(indicator.newTab().setCustomView(tab_icon("提现记录", true)));
-        indicator.addTab(indicator.newTab().setCustomView(tab_icon("收支明细", false)));
+        indicator.addTab(indicator.newTab().setCustomView(tab_icon(tabNames[0], true)));
+        indicator.addTab(indicator.newTab().setCustomView(tab_icon(tabNames[1], true)));
+        indicator.addTab(indicator.newTab().setCustomView(tab_icon(tabNames[2], false)));
         //Tablayout自定义view绑定ViewPager
         pager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(indicator));
         indicator.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(pager));
+        pager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
+            @Override
+            public void onPageScrolled(int i, float v, int i1) {
+
+            }
+
+            @Override
+            public void onPageSelected(int i) {
+                MY_MONEY_TAB.onEvent("tab_name", tabNames[2]);
+            }
+
+            @Override
+            public void onPageScrollStateChanged(int i) {
+
+            }
+        });
 
     }
 

+ 9 - 5
app/src/main/java/com/sheep/gamegroup/view/activity/ActReservation.java

@@ -100,17 +100,21 @@ public class ActReservation extends BaseActivity {
                     case 0:
                         return R.layout.find_reservation_item_top;
                     default:
-                        if(type + 1 == list.size())
-                            return R.layout.find_reservation_item_bottom;
-                        else
-                            return R.layout.find_reservation_item_center;
+                        return R.layout.find_reservation_item_bottom;
                 }
             }
 
             @Override
             public void convert(ViewHolder holder, FindAppReservation item) {
+                View find_reservation_item_center = holder.itemView.findViewById(R.id.find_reservation_item_center);
+                View find_reservation_item_bottom = holder.itemView.findViewById(R.id.find_reservation_item_bottom);
+                if(find_reservation_item_bottom != null) {
+                    find_reservation_item_center.setVisibility(item == null ? View.GONE : View.VISIBLE);
+                    find_reservation_item_bottom.setVisibility(item == null ? View.VISIBLE : View.GONE);
+                }
                 if(item != null)
                     loadItem(holder.itemView, item);
+
             }
         });
     }
@@ -126,7 +130,7 @@ public class ActReservation extends BaseActivity {
 
             ViewUtil.setImage(find_information_game_icon, findApp.getIcon());
             ViewUtil.setText(find_information_game_name, findApp.getName());
-            ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "开放时间:%s", TimeUtil.TimeStamp2Date(findApp.getDownload_at(), "yyyy-MM-dd\tHH:mm")));
+            ViewUtil.setText(find_information_game_time, String.format(Locale.CHINA, "开放时间:\n%s", TimeUtil.TimeStamp2Date(findApp.getDownload_at(), "yyyy-MM-dd\tHH:mm")));
             if(findApp.isCanDonload()){//可以下载
                 downLoadTextViewMap.put(findApp.getDownload_link(), find_information_game_bt1);
                 downLoadTextViewMap.put(findApp.getPackage_name(), find_information_game_bt1);

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

@@ -88,11 +88,6 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
         } catch (Exception e) {
             e.printStackTrace();
         }
-        ACache mCache = ACache.get(this);
-        Object object = mCache.getAsObject(Advertising.class.getSimpleName());
-        if(object instanceof Advertising){
-            Glide.with(activity).load(((Advertising) object).getDisplay_src()).into(splash_bg);
-        }
     }
 
     @Override
@@ -138,6 +133,11 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
     @Override
     public void initView() {
         activity = this;
+        ACache mCache = ACache.get(this);
+        Object object = mCache.getAsObject(Advertising.class.getSimpleName());
+        if(object instanceof Advertising){
+            Glide.with(activity).load(((Advertising) object).getDisplay_src()).into(splash_bg);
+        }
     }
 
     @Override

BIN=BIN
app/src/main/res/drawable-xhdpi/tab_class.webp


BIN=BIN
app/src/main/res/drawable-xhdpi/tab_class_click.webp


BIN=BIN
app/src/main/res/drawable-xhdpi/tab_game.webp


BIN=BIN
app/src/main/res/drawable-xhdpi/tab_game_click.webp


BIN=BIN
app/src/main/res/drawable-xxhdpi/tab_class.webp


BIN=BIN
app/src/main/res/drawable-xxhdpi/tab_class_click.webp


BIN=BIN
app/src/main/res/drawable-xxhdpi/tab_find.png


BIN=BIN
app/src/main/res/drawable-xxhdpi/tab_find_click.png


BIN=BIN
app/src/main/res/drawable-xxhdpi/tab_game.webp


BIN=BIN
app/src/main/res/drawable-xxhdpi/tab_game_click.webp


+ 0 - 8
app/src/main/res/drawable/drawable_selector_class.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <item android:drawable="@drawable/tab_class_click" android:state_activated="true"/>
-    <item android:drawable="@drawable/tab_class_click" android:state_pressed="true"/>
-    <item android:drawable="@drawable/tab_class"/>
-
-</selector>

+ 8 - 0
app/src/main/res/drawable/drawable_selector_find.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:drawable="@drawable/tab_find_click" android:state_activated="true"/>
+    <item android:drawable="@drawable/tab_find_click" android:state_pressed="true"/>
+    <item android:drawable="@drawable/tab_find"/>
+
+</selector>

+ 0 - 8
app/src/main/res/drawable/drawable_selector_game.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <item android:drawable="@drawable/tab_game_click" android:state_activated="true"/>
-    <item android:drawable="@drawable/tab_game_click" android:state_pressed="true"/>
-    <item android:drawable="@drawable/tab_game" />
-
-</selector>

+ 6 - 7
app/src/main/res/layout/act_find_game.xml

@@ -134,7 +134,7 @@
                             android:layout_width="match_parent"
                             android:layout_height="10dp"
                             android:max="100"
-                            android:progress="10"
+                            android:progress="0"
                             android:visibility="visible"
                             android:progressDrawable="@drawable/lay_list_progress"/>
 
@@ -165,7 +165,7 @@
                             android:layout_width="match_parent"
                             android:layout_height="10dp"
                             android:max="100"
-                            android:progress="10"
+                            android:progress="0"
                             android:visibility="visible"
                             android:progressDrawable="@drawable/lay_list_progress"/>
 
@@ -196,7 +196,7 @@
                             android:layout_width="match_parent"
                             android:layout_height="10dp"
                             android:max="100"
-                            android:progress="10"
+                            android:progress="0"
                             android:visibility="visible"
                             android:progressDrawable="@drawable/lay_list_progress"/>
 
@@ -227,7 +227,7 @@
                             android:layout_width="match_parent"
                             android:layout_height="10dp"
                             android:max="100"
-                            android:progress="10"
+                            android:progress="0"
                             android:visibility="visible"
                             android:progressDrawable="@drawable/lay_list_progress"/>
 
@@ -258,7 +258,7 @@
                             android:layout_width="match_parent"
                             android:layout_height="10dp"
                             android:max="100"
-                            android:progress="10"
+                            android:progress="0"
                             android:visibility="visible"
                             android:progressDrawable="@drawable/lay_list_progress"/>
 
@@ -444,10 +444,9 @@
         android:stepSize="0.5" />
     <TextView
         android:id="@+id/find_game_down_tv"
-        style="@style/style_button_wrap"
+        style="@style/style_button_find"
         android:layout_marginTop="@dimen/find_game_top4"
         android:layout_below="@+id/status_height_view"
-        android:layout_width="@dimen/find_bt_with"
         android:layout_alignParentEnd="true"
         android:text="下载" />
 </RelativeLayout>

+ 2 - 2
app/src/main/res/layout/activity_main.xml

@@ -49,7 +49,7 @@
                 android:layout_width="wrap_content"
                 android:minWidth="@dimen/tab_width"
                 android:layout_height="@dimen/tab_height"
-                android:drawableTop="@drawable/drawable_selector_game"
+                android:drawableTop="@drawable/drawable_selector_task"
                 android:textSize="10sp"
                 android:gravity="center"
                 android:textColor="@color/selector_color_main_tab"
@@ -61,7 +61,7 @@
                 android:layout_width="wrap_content"
                 android:minWidth="@dimen/tab_width"
                 android:layout_height="@dimen/tab_height"
-                android:drawableTop="@drawable/drawable_selector_class"
+                android:drawableTop="@drawable/drawable_selector_task"
                 android:textSize="10sp"
                 android:gravity="center"
                 android:textColor="@color/selector_color_main_tab"

+ 2 - 3
app/src/main/res/layout/find_information_bottom_item.xml

@@ -42,7 +42,7 @@
         android:layout_height="wrap_content"
         android:text="@string/app_name"
         android:textColor="#989898"
-        android:textSize="13sp"
+        android:textSize="12sp"
         app:layout_constraintBottom_toBottomOf="@+id/find_information_game_icon"
         app:layout_constraintStart_toStartOf="@+id/find_information_game_name"
         app:layout_constraintTop_toBottomOf="@+id/find_information_game_surplus" />
@@ -61,8 +61,7 @@
 
     <TextView
         android:id="@+id/find_information_game_task"
-        style="@style/style_button_wrap"
-        android:layout_width="@dimen/find_bt_with"
+        style="@style/style_button_find"
         android:text="接受任务"
         app:layout_constraintBottom_toBottomOf="@+id/find_information_game_icon"
         app:layout_constraintEnd_toEndOf="parent"

+ 3 - 2
app/src/main/res/layout/find_item.xml

@@ -75,9 +75,10 @@
 
         <TextView
             android:id="@+id/find_item_download"
-            style="@style/style_button_wrap"
-            android:layout_width="@dimen/find_bt_with"
+            style="@style/style_button_find"
             android:layout_alignParentEnd="true"
+            android:layout_marginTop="@dimen/content_padding_5"
+            android:layout_below="@+id/find_item_des"
             android:layout_centerVertical="true"
             android:text="下载游戏" />
     </RelativeLayout>

+ 4 - 4
app/src/main/res/layout/find_reservation_item.xml

@@ -29,7 +29,8 @@
         android:id="@+id/find_information_game_time"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="@string/app_name"
+        android:text="小绵羊小绵羊小绵羊小绵羊小小绵羊小绵羊小绵羊小绵羊小小绵羊小绵羊小绵羊小绵羊小小绵羊小绵羊小绵羊小绵羊小"
+        android:lineSpacingExtra="@dimen/content_padding_5"
         android:textColor="#989898"
         android:textSize="13sp"
         app:layout_constraintBottom_toBottomOf="@+id/find_information_game_icon"
@@ -39,8 +40,7 @@
 
     <TextView
         android:id="@+id/find_information_game_bt1"
-        style="@style/style_button_wrap"
-        android:layout_width="@dimen/find_bt_with"
+        style="@style/style_button_find"
         android:text="立即下载"
         app:layout_constraintBottom_toTopOf="@+id/find_information_game_bt2"
         app:layout_constraintEnd_toEndOf="@+id/find_information_game_bt2"
@@ -48,7 +48,7 @@
         app:layout_constraintTop_toTopOf="@+id/find_information_game_icon"/>
     <TextView
         android:id="@+id/find_information_game_bt2"
-        style="@style/style_button_wrap2"
+        style="@style/style_button_find2"
         android:layout_width="100dp"
         android:text="立即预约"
         app:layout_constraintBottom_toBottomOf="@+id/find_information_game_icon"

+ 11 - 2
app/src/main/res/layout/find_reservation_item_bottom.xml

@@ -1,5 +1,14 @@
 <?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="@dimen/content_padding"
-    android:background="@drawable/shape_white_solid_rectangle_small_bottom"/>
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+    <include
+        android:id="@+id/find_reservation_item_center"
+        layout="@layout/find_reservation_item_center"/>
+    <View
+        android:id="@+id/find_reservation_item_bottom"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/content_padding"
+        android:background="@drawable/shape_white_solid_rectangle_small_bottom"/>
+</LinearLayout>

+ 4 - 8
app/src/main/res/values/dd_styles.xml

@@ -23,26 +23,22 @@
         <item name="android:layout_margin">@dimen/dp_10</item>
         <item name="android:textSize">@dimen/text_size_15</item>
     </style>
-    <style name="style_button_wrap">
-        <item name="android:layout_width">wrap_content</item>
+    <style name="style_button_find">
+        <item name="android:layout_width">@dimen/find_bt_with</item>
         <item name="android:layout_height">wrap_content</item>
         <item name="android:background">@drawable/selector_button_full_main</item>
         <item name="android:gravity">center</item>
         <item name="android:paddingBottom">5dp</item>
-        <item name="android:paddingEnd">@dimen/content_padding_20</item>
-        <item name="android:paddingStart">@dimen/content_padding_20</item>
         <item name="android:paddingTop">5dp</item>
         <item name="android:textColor">@color/btn_color_main</item>
         <item name="android:textSize">@dimen/text_size_15</item>
     </style>
-    <style name="style_button_wrap2">
-        <item name="android:layout_width">wrap_content</item>
+    <style name="style_button_find2">
+        <item name="android:layout_width">@dimen/find_bt_with</item>
         <item name="android:layout_height">wrap_content</item>
         <item name="android:background">@drawable/selector_button_full_main2</item>
         <item name="android:gravity">center</item>
         <item name="android:paddingBottom">5dp</item>
-        <item name="android:paddingEnd">@dimen/content_padding_20</item>
-        <item name="android:paddingStart">@dimen/content_padding_20</item>
         <item name="android:paddingTop">5dp</item>
         <item name="android:textColor">@color/selector_color_main_tab2</item>
         <item name="android:textSize">@dimen/text_size_15</item>

+ 5 - 5
app/src/main/res/values/str_network_strings.xml

@@ -2,10 +2,10 @@
 <resources>
     <string name="coming_soon">敬请期待</string>
     <string name="loading_data">数据正在加载中,请稍候重试</string>
-    <string name="service_data_error">数据错误,请稍候再试</string>
+    <string name="service_data_error">数据配置中,请稍候再试</string>
     <string name="unknown_error">未知错误,请稍候再试</string>
-    <string name="error_data">数据错误,请联系客服</string>
-    <string name="error_link">地址错误,请联系客服</string>
-    <string name="error_download_link">下载地址错误,请联系客服</string>
-    <string name="error_package_link">包名错误,请联系客服</string>
+    <string name="error_data">暂无数据,请稍候再试</string>
+    <string name="error_link">暂无地址,请稍候再试</string>
+    <string name="error_download_link">暂无下载地址</string>
+    <string name="error_package_link">暂无包名,请稍候再试</string>
 </resources>