Activity 统一入口
This commit is contained in:
@ -2,10 +2,12 @@ package com.gh.gamecenter;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.SharedPreferences.Editor;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.Window;
|
||||
@ -17,6 +19,7 @@ import android.widget.Toast;
|
||||
import com.gh.base.BaseActivity;
|
||||
import com.gh.common.constant.Config;
|
||||
import com.gh.common.util.DialogUtils;
|
||||
import com.gh.common.util.EntranceUtils;
|
||||
import com.gh.common.util.FileUtils;
|
||||
import com.gh.gamecenter.eventbus.EBReuse;
|
||||
import com.gh.gamecenter.eventbus.EBSkip;
|
||||
@ -65,6 +68,13 @@ public class SettingActivity extends BaseActivity implements OnClickListener {
|
||||
|
||||
private int checkSizeIndex;
|
||||
|
||||
@NonNull
|
||||
public static Intent getIntent(Context context, String entrance) {
|
||||
Intent intent = new Intent(context, SettingActivity.class);
|
||||
intent.putExtra(EntranceUtils.KEY_ENTRANCE, entrance);
|
||||
return intent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finish() {
|
||||
saveCurrentSetting();
|
||||
@ -211,8 +221,7 @@ public class SettingActivity extends BaseActivity implements OnClickListener {
|
||||
fontSize();
|
||||
break;
|
||||
case setting_rl_about:
|
||||
Intent intentAbout = new Intent(this, AboutActivity.class);
|
||||
startActivity(intentAbout);
|
||||
startActivity(AboutActivity.getIntent(this));
|
||||
break;
|
||||
case R.id.setting_rl_concerngame:
|
||||
setting_sb_concerngame.performClick();
|
||||
|
||||
Reference in New Issue
Block a user