|
|
@@ -179,10 +179,14 @@ public class ActGameGroupOrGameDetail extends BaseActivity {
|
|
|
fgtGameComment.setSmartRefreshLayout(refresh);
|
|
|
fgtGameComment.setListAction1(fgtGameDetail);
|
|
|
mAdapter.add(fgtGameDetail, "详情");
|
|
|
+
|
|
|
if(hasWelfare){
|
|
|
FgtGameWelfare fgtGameWelfare = FgtGameWelfare.newInstance(id);
|
|
|
fgtGameWelfare.setSmartRefreshLayout(refresh);
|
|
|
mAdapter.add(fgtGameWelfare, "福利");
|
|
|
+ pingJiaIndex = 2;//评价的位置为2;
|
|
|
+ } else {
|
|
|
+ pingJiaIndex = 1;//评价的位置可能为1;
|
|
|
}
|
|
|
|
|
|
mAdapter.add(fgtGameComment, "评价");
|
|
|
@@ -264,6 +268,7 @@ public class ActGameGroupOrGameDetail extends BaseActivity {
|
|
|
gc_game_app_detail_bt1.setText(gameEntity.isIs_focus_game() ? R.string.has_focus : R.string.focus);
|
|
|
}
|
|
|
|
|
|
+ private int pingJiaIndex = 1;
|
|
|
//加载游戏数据
|
|
|
private void loadData(final GameEntity gameEntity) {
|
|
|
this.gameEntity = gameEntity;
|
|
|
@@ -272,7 +277,7 @@ public class ActGameGroupOrGameDetail extends BaseActivity {
|
|
|
tryInitGift();
|
|
|
//更新评价数量
|
|
|
if (gameEntity.getApp().getComment_num() > 0) {
|
|
|
- TabLayout.Tab tab = tabLayout.getTabAt(1);
|
|
|
+ TabLayout.Tab tab = tabLayout.getTabAt(pingJiaIndex);
|
|
|
if (tab != null)
|
|
|
tab.setText(String.format(Locale.CHINA, "评价(%d)", gameEntity.getApp().getComment_num()));
|
|
|
CommonUtil.getInstance().reflex(tabLayout, this, true);
|