Back to project page AndroidLifecyle.
The source code is released under:
Apache License
If you think the Android project AndroidLifecyle listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.cocosw.lifecycle.app; // w w w .java 2 s. c o m import android.os.Bundle; import com.cocosw.lifecycle.LifecycleDispatcher; /** * Project: AndroidLifeCycleCallback * Created by LiaoKai(soarcn) on 14-3-18. */ public class FragmentActivity extends android.support.v4.app.FragmentActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LifecycleDispatcher.get().onActivityCreated(this, savedInstanceState); } @Override protected void onStart() { super.onStart(); LifecycleDispatcher.get().onActivityStarted(this); } @Override protected void onResume() { super.onResume(); LifecycleDispatcher.get().onActivityResumed(this); } @Override protected void onPause() { super.onPause(); LifecycleDispatcher.get().onActivityPaused(this); } @Override protected void onStop() { super.onStop(); LifecycleDispatcher.get().onActivityStopped(this); } @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); LifecycleDispatcher.get().onActivitySaveInstanceState(this, outState); } @Override protected void onDestroy() { super.onDestroy(); LifecycleDispatcher.get().onActivityDestroyed(this); } }