去除KEY_DATA, NormalActivity增加适配规则

This commit is contained in:
kehaoyuan
2018-01-23 17:32:48 +08:00
parent 2d1bb6435f
commit af9e9a87b4
17 changed files with 26 additions and 67 deletions

View File

@ -54,8 +54,6 @@ import pub.devrel.easypermissions.EasyPermissions;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
import static com.gh.common.util.EntranceUtils.KEY_DATA;
/**
* 引导页面
*/
@ -91,7 +89,7 @@ public class SplashScreenActivity extends BaseActivity {
intent.setAction(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra(KEY_DATA, bundle);
intent.putExtras(bundle);
return intent;
}
@ -169,16 +167,12 @@ public class SplashScreenActivity extends BaseActivity {
// 跳转到主界面
private void launch() {
Bundle bundle = getIntent().getExtras();
if (getIntent().getBundleExtra(KEY_DATA) != null) {
bundle = getIntent().getBundleExtra(KEY_DATA);
}
Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);
if (isNewFirstLaunch) {
if (bundle == null) bundle = new Bundle();
intent.putExtra(BaseFragment_ViewPager.ARGS_INDEX, MainWrapperFragment.INDEX_ASK);
}
intent.putExtra(KEY_DATA, bundle);
if (bundle != null) intent.putExtras(bundle);
startActivity(intent);
finish();
}