Android Open Source - AndroidLifecyle Fragment Activity






From Project

Back to project page AndroidLifecyle.

License

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.

Java Source Code

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);
    }
}




Java Source Code List

com.cocosw.lifecycle.ActivityLifecycleCallbacksAdapter.java
com.cocosw.lifecycle.ActivityLifecycleCallbacksCompat.java
com.cocosw.lifecycle.ActivityLifecycleCallbacksWrapper.java
com.cocosw.lifecycle.FragmentLifecycleCallbacksAdapter.java
com.cocosw.lifecycle.FragmentLifecycleCallbacks.java
com.cocosw.lifecycle.LifecycleDispatcher.java
com.cocosw.lifecycle.app.Activity.java
com.cocosw.lifecycle.app.FragmentActivity.java
com.cocosw.lifecycle.app.Fragment.java