|
|
@@ -50,6 +50,7 @@ import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter2;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
|
+import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
|
|
|
|
|
|
import org.afinal.simplecache.ApiKey;
|
|
|
import org.greenrobot.eventbus.EventBus;
|
|
|
@@ -81,7 +82,7 @@ public class ActGameGroupOrGameDetail extends BaseActivity {
|
|
|
StatusBarUtils.setTranslucent(this);
|
|
|
super.onCreate(savedInstanceState);
|
|
|
}
|
|
|
-
|
|
|
+ public static final String AUTO_DOWNLOAD = "auto_download";//自动下载的标识
|
|
|
@Override
|
|
|
protected int getLayoutId() {
|
|
|
return R.layout.act_game_group_or_game_detail;
|
|
|
@@ -138,12 +139,14 @@ public class ActGameGroupOrGameDetail extends BaseActivity {
|
|
|
private FgtGameComment fgtGameComment;
|
|
|
|
|
|
private int id;
|
|
|
+ private boolean isAutoDownload;
|
|
|
private GameGroup gameGroup;
|
|
|
|
|
|
@Override
|
|
|
public void initView() {
|
|
|
Intent intent = getIntent();
|
|
|
id = intent.getIntExtra("id", 0);
|
|
|
+ isAutoDownload = intent.getBooleanExtra(AUTO_DOWNLOAD, false);
|
|
|
gameGroup = DataUtil.getObject(intent, GameGroup.class);
|
|
|
EventBus.getDefault().register(this);
|
|
|
//tagList
|
|
|
@@ -280,6 +283,12 @@ public class ActGameGroupOrGameDetail extends BaseActivity {
|
|
|
CommonUtil.getInstance().palyGameDetailBtnValue(false, gameEntity, gc_game_app_detail_bt2, 0);
|
|
|
fgtGameDetail.loadData(gameEntity);
|
|
|
ViewUtil.setVisibility(gc_game_app_detail_bt3, gameEntity.getApp().hasGameDiscountId());
|
|
|
+
|
|
|
+ if(isAutoDownload){//可以进行自动下载
|
|
|
+ if(!PackageUtil.isAppInstalled(SheepApp.getInstance(), gameEntity.getApp().getPackage_name())) {//未安装的情况才进行下载
|
|
|
+ gc_game_app_detail_bt2.performLongClick();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
//更新评分
|
|
|
public void updateScore(float score) {
|