Android Open Source - rxloader Save Callback






From Project

Back to project page rxloader.

License

The source code is released under:

Apache License

If you think the Android project rxloader 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 me.tatarka.rxloader;
/*from  w w  w  .  j  a va  2s.c o m*/
import android.os.Bundle;

/**
 * A set of callbacks to handle saving and restoring a value from an Activity's or Fragment's
 * instance state.
 *
 * @param <T> the value type
 */
public interface SaveCallback<T> {
    /**
     * Called when the value need to be saved.
     *
     * @param key      A unique key for the given value. It is suggested that you use this to prefix
     *                 keys you add to the {@code Bundle}.
     * @param value    the value
     * @param outState the {@code Bundle} to save the value in
     */
    void onSave(String key, T value, Bundle outState);

    /**
     * Called when the value needs to be restored.
     *
     * @param key        A unique key for the given value. It is suggested that you use this to
     *                   prefix keys you add to the {@code Bundle}.
     * @param savedState the {@code Bundle} to restore the value from
     * @return the value
     */
    T onRestore(String key, Bundle savedState);
}




Java Source Code List

me.tatarka.rxloader.BaseRxLoader.java
me.tatarka.rxloader.CachingWeakRefSubscriber.java
me.tatarka.rxloader.ParcelableSaveCallback.java
me.tatarka.rxloader.RxLoader1.java
me.tatarka.rxloader.RxLoader2.java
me.tatarka.rxloader.RxLoaderBackendFragmentCompat.java
me.tatarka.rxloader.RxLoaderBackendFragmentHelper.java
me.tatarka.rxloader.RxLoaderBackendFragment.java
me.tatarka.rxloader.RxLoaderBackendNestedFragmentCompat.java
me.tatarka.rxloader.RxLoaderBackendNestedFragment.java
me.tatarka.rxloader.RxLoaderBackend.java
me.tatarka.rxloader.RxLoaderManagerCompat.java
me.tatarka.rxloader.RxLoaderManager.java
me.tatarka.rxloader.RxLoaderObserver.java
me.tatarka.rxloader.RxLoader.java
me.tatarka.rxloader.SaveCallback.java
me.tatarka.rxloader.sample.MainActivityWithFragment.java
me.tatarka.rxloader.sample.MainActivityWithViewPager.java
me.tatarka.rxloader.sample.MainActivity.java
me.tatarka.rxloader.sample.MainFragment.java
me.tatarka.rxloader.sample.SampleObservables.java