-
Notifications
You must be signed in to change notification settings - Fork 168
2_init in Application
水牛 edited this page Nov 17, 2017
·
1 revision
invoke in the onCreate() method of your BaseApplication
StyledDialog.init(this);
private void registCallback() {
registerActivityLifecycleCallbacks(new ActivityLifecycleCallbacks() {
@Override
public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
ActivityStackManager.getInstance().addActivity(activity);
}
@Override
public void onActivityStarted(Activity activity) {
}
@Override
public void onActivityResumed(Activity activity) {
}
@Override
public void onActivityPaused(Activity activity) {
}
@Override
public void onActivityStopped(Activity activity) {
}
@Override
public void onActivitySaveInstanceState(Activity activity, Bundle outState) {
}
@Override
public void onActivityDestroyed(Activity activity) {
ActivityStackManager.getInstance().removeActivity(activity);
}
});
}