代码合并

This commit is contained in:
huangzhuanghua
2017-03-02 11:23:19 +08:00
150 changed files with 12278 additions and 302 deletions

View File

@ -21,10 +21,8 @@ import com.gh.base.BaseActivity;
import com.gh.common.constant.Config;
import com.gh.common.util.DialogUtils;
import com.gh.common.util.FileUtils;
import com.gh.common.util.PackageUtils;
import com.gh.gamecenter.eventbus.EBReuse;
import com.gh.gamecenter.eventbus.EBSkip;
import com.gh.gamecenter.manager.UpdateManager;
import com.kyleduo.switchbutton.SwitchButton;
import java.io.File;
@ -43,9 +41,7 @@ public class SettingActivity extends BaseActivity implements OnClickListener {
@BindView(R.id.setting_sb_autoinstall) SwitchButton setting_sb_autoinstall;
@BindView(R.id.setting_sb_autodelete) SwitchButton setting_sb_autodelete;
@BindView(R.id.setting_sb_deletedata) SwitchButton setting_sb_deletedata;
@BindView(R.id.setting_sb_autoupdate) SwitchButton setting_sb_autoupdate;
@BindView(R.id.setting_sb_concerngame) SwitchButton setting_sb_concerngame;
@BindView(R.id.setting_tv_version) TextView setting_tv_version;
@BindView(R.id.setting_tv_cache) TextView setting_tv_cache;
@BindView(R.id.setting_tv_size) TextView setting_tv_size;
@ -76,14 +72,11 @@ public class SettingActivity extends BaseActivity implements OnClickListener {
findViewById(R.id.setting_rl_autoinstall).setOnClickListener(this);
findViewById(R.id.setting_rl_autodelete).setOnClickListener(this);
findViewById(R.id.setting_rl_deletedata).setOnClickListener(this);
findViewById(R.id.setting_rl_autoupdate).setOnClickListener(this);
findViewById(R.id.setting_rl_update).setOnClickListener(this);
findViewById(R.id.setting_rl_feedback).setOnClickListener(this);
findViewById(R.id.setting_rl_cache).setOnClickListener(this);
findViewById(R.id.setting_cv_font_size).setOnClickListener(this);
findViewById(R.id.setting_rl_concerngame).setOnClickListener(this);
setting_tv_version.setText(String.format("当前版本V%s", PackageUtils.getVersionName(getApplicationContext())));
findViewById(R.id.setting_rl_about).setOnClickListener(this);
setting_tv_cache.setText(getCacheSize());
@ -98,7 +91,6 @@ public class SettingActivity extends BaseActivity implements OnClickListener {
setting_sb_autoinstall.setChecked(sp.getBoolean("autoinstall", true));
setting_sb_autodelete.setChecked(sp.getBoolean("autodelete", true));
setting_sb_deletedata.setChecked(sp.getBoolean("deletedata", true));
setting_sb_autoupdate.setChecked(sp.getBoolean("autoupdate", true));
setting_sb_concerngame.setChecked(sp.getBoolean("concerngame", true));
checkSizeIndex = sp.getInt("fontsize", 1);
@ -148,7 +140,6 @@ public class SettingActivity extends BaseActivity implements OnClickListener {
mEditor.putBoolean("autoinstall", setting_sb_autoinstall.isChecked());
mEditor.putBoolean("autodelete", setting_sb_autodelete.isChecked());
mEditor.putBoolean("deletedata", setting_sb_deletedata.isChecked());
mEditor.putBoolean("autoupdate", setting_sb_autoupdate.isChecked());
mEditor.putBoolean("concerngame", setting_sb_concerngame.isChecked());
mEditor.putInt("fontsize",checkSizeIndex);
mEditor.apply();
@ -189,12 +180,6 @@ public class SettingActivity extends BaseActivity implements OnClickListener {
case R.id.setting_rl_deletedata:
setting_sb_deletedata.performClick();
break;
case R.id.setting_rl_autoupdate:
setting_sb_autoupdate.performClick();
break;
case R.id.setting_rl_update:
UpdateManager.getInstance(this).checkUpdate(false);
break;
case R.id.setting_rl_cache:
DialogUtils.showWarningDialog(this, "清除缓存", "清空缓存后未安装的游戏可能需要重新下载,确定清空?",
new DialogUtils.ConfiremListener() {
@ -213,6 +198,10 @@ public class SettingActivity extends BaseActivity implements OnClickListener {
case R.id.setting_cv_font_size:
fontSize();
break;
case R.id.setting_rl_about:
Intent intentAbout = new Intent(this, AboutActivity.class);
startActivity(intentAbout);
break;
case R.id.setting_rl_concerngame:
setting_sb_concerngame.performClick();
default: