Example usage for android.support.v4.content Loader abandon

List of usage examples for android.support.v4.content Loader abandon

Introduction

In this page you can find the example usage for android.support.v4.content Loader abandon.

Prototype

public void abandon() 

Source Link

Document

Tell the Loader that it is being abandoned.

Usage

From source file:net.yadiary.android.sample.yamaneko.MainActivity.java

public void doSearch(String codep, String codes) {
    CommonUtils.logit("called with codep=" + codep + ",codes=" + codes);
    ListFragment listFragment = (ListFragment) getSupportFragmentManager()
            .findFragmentById(R.id.fragmentMainList);
    Bundle bundle = new Bundle();
    bundle.putString(JPostalProvider.FIELD_CODEPREFIX, codep);
    bundle.putString(JPostalProvider.FIELD_CODESUFFIX, codes);
    bundle.putString(JPostalProvider.FIELD_QID, "" + new java.util.Date().getTime());

    getSupportLoaderManager().restartLoader(0, bundle, listFragment);
    Loader<Void> loader = getSupportLoaderManager().getLoader(1);
    if (loader != null) {
        loader.abandon();
    }//from   ww w.j  a v  a  2 s.  co  m
    getSupportLoaderManager().restartLoader(1, bundle, this);
}

From source file:com.zns.comicdroid.BaseListFragment.java

@Override
public void onDestroy() {
    Loader<Cursor> loader = getActivity().getSupportLoaderManager().getLoader(mIndex);
    if (loader != null) {
        loader.abandon();
        getActivity().getSupportLoaderManager().destroyLoader(mIndex);
    }/* ww w . j  ava  2  s .c o m*/
    super.onDestroy();
}

From source file:org.rm3l.ddwrt.tiles.DDWRTTile.java

/**
 * Called when a previously created loader is being reset, and thus
 * making its data unavailable.  The application should at this point
 * remove any references it has to the Loader's data.
 *
 * @param loader The Loader that is being reset.
 *//*from w  w  w. j  a va 2  s .c o  m*/
@Override
public final void onLoaderReset(Loader<T> loader) {
    Log.d(getLogTag(), "onLoaderReset: loader=" + loader);
    loader.abandon();
}