check entrance

This commit is contained in:
dream
2017-09-07 14:32:20 +08:00
parent 98983ff4eb
commit cb49c71279
28 changed files with 118 additions and 89 deletions

View File

@ -86,6 +86,7 @@ import rx.functions.Action1;
import rx.schedulers.Schedulers;
import static com.gh.common.util.EntranceUtils.KEY_DATA;
import static com.gh.common.util.EntranceUtils.KEY_TO;
/**
* 项目的主Activity3个Fragment都嵌入在这里。
@ -105,9 +106,9 @@ public class MainActivity extends BaseActivity {
public void run() {
if (getIntent() != null && getIntent().getExtras() != null && !isSkipped) {
isSkipped = true;
Bundle bundle = getIntent().getBundleExtra("data");
Bundle bundle = getIntent().getBundleExtra(KEY_DATA);
if (bundle != null) {
String to = bundle.getString("to");
String to = bundle.getString(KEY_TO);
if (!TextUtils.isEmpty(to)) {
Class<?> clazz = ClassUtils.forName(to);
if (clazz != null) {
@ -122,7 +123,7 @@ public class MainActivity extends BaseActivity {
bundle.putInt("currentItem", 1);
}
skipIntent.putExtra("data", bundle);
skipIntent.putExtra(KEY_DATA, bundle);
startActivity(skipIntent);
}
}