Example usage for android.content CursorLoader CursorLoader

List of usage examples for android.content CursorLoader CursorLoader

Introduction

In this page you can find the example usage for android.content CursorLoader CursorLoader.

Prototype

public CursorLoader(Context context, Uri uri, String[] projection, String selection, String[] selectionArgs,
        String sortOrder) 

Source Link

Document

Creates a fully-specified CursorLoader.

Usage

From source file:de.hshannover.f4.trust.ironcontrol.view.list_activities.ListResultMetaActivity.java

@Override
protected Loader<Cursor> onCreateLoader(int id, Bundle args, ListHierarchyType type) {
    Uri uri = Uri/*  w  ww. j  a  v  a 2 s. c  o m*/
            .parse(DBContentProvider.RESULT_ITEMS_URI + "/" + id + "/" + DBContentProvider.RESULT_METADATA);
    return new CursorLoader(this, uri, null, null, null, null);
}

From source file:de.hshannover.f4.trust.ironcontrol.view.list_activities.ListResultItemsActivity.java

@Override
protected Loader<Cursor> onCreateLoader(int id, Bundle args, ListHierarchyType type) {
    Uri uri = Uri.parse(DBContentProvider.RESPONSES_URI + "/" + id + "/" + DBContentProvider.RESULT_ITEMS);
    CursorLoader cursorLoader = new CursorLoader(this, uri, null, null, null, null);
    return cursorLoader;
}

From source file:org.mariotaku.twidere.activity.support.AccountSelectorActivity.java

@Override
public Loader<Cursor> onCreateLoader(final int id, final Bundle args) {
    final String where = isOAuthOnly() ? Accounts.AUTH_TYPE + " = " + ParcelableCredentials.AUTH_TYPE_OAUTH
            : null;/*from   www  .  j  a  v  a2s . c  o  m*/
    return new CursorLoader(this, Accounts.CONTENT_URI, Accounts.COLUMNS, where, null, null);
}

From source file:com.commonsware.android.dragdrop.MainActivity.java

@Override
public Loader<Cursor> onCreateLoader(int arg0, Bundle arg1) {
    return (new CursorLoader(this, MediaStore.Video.Media.EXTERNAL_CONTENT_URI, null, null, null,
            MediaStore.Video.Media.TITLE));
}

From source file:foo.bar.permission2.PermissionActivity.java

@Override
public Loader<Cursor> onCreateLoader(int loaderId, Bundle args) {
    switch (loaderId) {
    case CONTACTS_LOADER: {
        return new CursorLoader(this, ContactsContract.Contacts.CONTENT_URI, CONTACTS_PROJECTION, null, null,
                null);/*from   w  w  w . j a  v  a  2  s. co m*/
    }

    case EVENTS_LOADER: {
        return new CursorLoader(this, CalendarContract.Events.CONTENT_URI, EVENTS_PROJECTION, null, null, null);
    }

    default: {
        return null;
    }
    }
}

From source file:de.vanita5.twittnuker.activity.support.AccountSelectorActivity.java

@Override
public Loader<Cursor> onCreateLoader(final int id, final Bundle args) {
    final String where = isOAuthOnly() ? Accounts.AUTH_TYPE + " = " + Accounts.AUTH_TYPE_OAUTH : null;
    return new CursorLoader(this, Accounts.CONTENT_URI, Accounts.COLUMNS, where, null, null);
}

From source file:com.aengbee.android.leanback.ui.VerticalGridFragment.java

@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
    return new CursorLoader(getActivity(), VideoContract.VideoEntry.CONTENT_URI, null, // projection
            null, // selection
            null, // selection clause
            null // sort order
    );/*from w  ww. ja v a2s.  c  om*/
}

From source file:com.baqsoft.listas.ui.edit.EditItemFragment.java

/**
 * Instantiate and return a new Loader for the given ID.
 *
 * @param id   The ID whose loader is to be created.
 * @param args Any arguments supplied by the caller.
 * @return Return a new Loader instance that is ready to start loading.
 *///ww w  . j a v a 2 s.c  om
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
    // Spinner loader.
    String[] catCheckProjection = { ListasContract.CatCheckContract.COLUMN_ID,
            ListasContract.CatCheckContract.COLUMN_TITLE };
    return new CursorLoader(getActivity(), Uri.parse(ListasContract.CatCheckContract.URI_STRING),
            catCheckProjection, null, null, null);
    //        }
}

From source file:com.example.olivi.maphap.DetailFragment.java

@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
    Log.i(LOG_TAG, "onCreateLoader called");
    if (null != mUri) {
        return new CursorLoader(getActivity(), mUri, Projections.EVENT_COLUMNS_DETAIL_VIEW, null, null, null);
    }//from ww w  . j  a v  a 2  s  . com
    return null;
}

From source file:com.espian.ticktock.TickTockActivity.java

@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
    return new CursorLoader(this, TickTockProvider.countdownUri, null, null, null, null);
}