| /external/libgdx/tests/gdx-tests-lwjgl3/src/com/badlogic/gdx/tests/lwjgl3/ |
| MultiWindowCursorTest.java | 5 import com.badlogic.gdx.graphics.Cursor; 22 Cursor.SystemCursor[] systemCursors = Cursor.SystemCursor.values(); 23 Cursor.SystemCursor systemCursor = systemCursors[MathUtils.random(systemCursors.length - 1)]; 32 Cursor cursor = Gdx.graphics.newCursor(pixmap, pixmap.getWidth() / 2, pixmap.getHeight() / 2); local 33 Gdx.graphics.setCursor(cursor);
|
| /frameworks/base/core/java/android/database/ |
| AbstractWindowedCursor.java | 22 * The cursor owns the cursor window it uses. When the cursor is closed, 23 * its window is also closed. Likewise, when the window used by the cursor is 25 * that cursor windows are not leaked. 27 * Subclasses are responsible for filling the cursor window with data during 28 * {@link #onMove(int, int)}, allocating a new cursor window if necessary. 29 * During {@link #requery()}, the existing cursor window should be cleared and 32 * If the contents of the cursor change or become invalid, the old window must be closed 33 * (because it is owned by the cursor) and set to null [all...] |
| CursorJoiner.java | 47 private Cursor mCursorLeft; 48 private Cursor mCursorRight; 59 /** The row currently pointed to by the left cursor is unique */ 61 /** The row currently pointed to by the right cursor is unique */ 70 * @param cursorLeft The left cursor to compare 71 * @param columnNamesLeft The column names to compare from the left cursor 72 * @param cursorRight The right cursor to compare 73 * @param columnNamesRight The column names to compare from the right cursor 76 Cursor cursorLeft, String[] columnNamesLeft, 77 Cursor cursorRight, String[] columnNamesRight) [all...] |
| /frameworks/support/compat/java/android/support/v4/content/ |
| ContentResolverCompat.java | 20 import android.database.Cursor; 32 Cursor query(ContentResolver resolver, 39 public Cursor query(ContentResolver resolver, Uri uri, String[] projection, 53 public Cursor query(ContentResolver resolver, Uri uri, String[] projection, 89 * Query the given URI, returning a {@link Cursor} over the result set 119 * @return A Cursor object, which is positioned before the first entry, or null 120 * @see Cursor 122 public static Cursor query(ContentResolver resolver,
|
| /packages/apps/Gallery2/src/com/android/photos/adapters/ |
| AlbumSetCursorAdapter.java | 20 import android.database.Cursor; 39 private LoaderCompatShim<Cursor> mDrawableFactory; 41 public void setDrawableFactory(LoaderCompatShim<Cursor> factory) { 50 public void bindView(View v, Context context, Cursor cursor) { 53 titleTextView.setText(cursor.getString(AlbumSetLoader.INDEX_TITLE)); 57 int count = cursor.getInt(AlbumSetLoader.INDEX_COUNT); 64 Drawable drawable = mDrawableFactory.drawableForItem(cursor, recycle); 71 public View newView(Context context, Cursor cursor, ViewGroup parent) [all...] |
| /packages/apps/Launcher3/src/com/android/launcher3/util/ |
| CursorIconInfo.java | 21 import android.database.Cursor; 30 * Utility class to load icon from a cursor. 41 public CursorIconInfo(Context context, Cursor c) { 52 * Loads the icon from the cursor and updates the {@param info} if the icon is an app resource. 54 public Bitmap loadIcon(Cursor c, ShortcutInfo info) { 74 public Bitmap loadIcon(Cursor c) { 81 public String getTitle(Cursor c) {
|
| /packages/experimental/LoaderApp/src/com/android/loaderapp/ |
| CursorFactoryListAdapter.java | 23 import android.database.Cursor; 35 public void bindView(View view, Context context, Cursor cursor); 55 public void bindView(View view, Context context, Cursor cursor) { 57 name.setText(cursor.getString(ContactsListLoader.COLUMN_NAME)); 62 super(context, null, /* disable content observers for the cursor */0); 67 public View newView(Context context, Cursor cursor, ViewGroup parent) { 69 mViewFactory.bindView(view, context, cursor); [all...] |
| /external/robolectric/v1/src/main/java/com/xtremelabs/robolectric/shadows/ |
| ShadowCursorAdapter.java | 22 import android.database.Cursor; 39 * Adapter that exposes data from a {@link android.database.Cursor Cursor} to a 40 * {@link android.widget.ListView ListView} widget. The Cursor must include 50 // if the cursor is null OR there are no views to dispense return null 86 protected Cursor mCursor; 119 * Constructor. The adapter will call requery() on the cursor whenever 122 * @param c The cursor from which to get the data. 125 public void __constructor__(Context context, Cursor c) { 132 * @param c The cursor from which to get the data [all...] |
| /frameworks/base/core/java/android/widget/ |
| SimpleCursorTreeAdapter.java | 20 import android.database.Cursor; 25 * An easy adapter to map columns from a cursor to TextViews or ImageViews 32 * {@link ViewBinder#setViewValue(android.view.View, android.database.Cursor, int)} 75 * @param cursor The database cursor 102 public SimpleCursorTreeAdapter(Context context, Cursor cursor, int collapsedGroupLayout, 105 super(context, cursor, collapsedGroupLayout, expandedGroupLayout, childLayout, 116 * @param cursor The database cursor [all...] |
| /packages/apps/ContactsCommon/src/com/android/contacts/common/util/ |
| DataStatus.java | 21 import android.database.Cursor; 31 * {@link #possibleUpdate(Cursor)} to consider updating when a better status 46 public DataStatus(Cursor cursor) { 47 // When creating from cursor row, fill normally 48 fromCursor(cursor); 53 * current row of the given {@link Cursor}. 55 public void possibleUpdate(Cursor cursor) { 56 final boolean hasStatus = !isNull(cursor, Data.STATUS) [all...] |
| /packages/apps/Gallery/src/com/android/camera/gallery/ |
| BaseImageList.java | 24 import android.database.Cursor; 44 protected Cursor mCursor; 70 // IllegalStateException may be thrown if the cursor is stale. 71 Log.e(TAG, "Caught exception while deactivating cursor.", e); 96 Cursor cursor = getCursor(); local 97 if (cursor == null) return 0; 99 return cursor.getCount(); 107 private Cursor getCursor() { 121 Cursor cursor = getCursor() local 197 Cursor cursor = getCursor(); local [all...] |
| ImageList.java | 20 import android.database.Cursor; 41 Cursor cursor = Media.query( local 49 while (cursor.moveToNext()) { 50 hash.put(cursor.getString(1), cursor.getString(0)); 54 cursor.close(); 88 protected Cursor createCursor() { 89 Cursor c = Media.query( 115 protected long getImageId(Cursor cursor) [all...] |
| VideoList.java | 20 import android.database.Cursor; 53 protected long getImageId(Cursor cursor) { 54 return cursor.getLong(INDEX_ID); 58 protected BaseImage loadImageFromCursor(Cursor cursor) { 59 long id = cursor.getLong(INDEX_ID); 60 String dataPath = cursor.getString(INDEX_DATA_PATH); 61 long dateTaken = cursor.getLong(INDEX_DATE_TAKEN); 63 dateTaken = cursor.getLong(INDEX_DATE_MODIFIED) * 1000 [all...] |
| /packages/apps/Messaging/src/com/android/messaging/datamodel/data/ |
| ContactPickerData.java | 22 import android.database.Cursor; 41 LoaderManager.LoaderCallbacks<Cursor> { 43 void onAllContactsCursorUpdated(Cursor data); 44 void onFrequentContactsCursorUpdated(Cursor data); 65 public Loader<Cursor> onCreateLoader(final int id, final Bundle args) { 94 public void onLoadFinished(final Loader<Cursor> loader, final Cursor data) { 114 // The frequent contacts cursor to be used in the UI depends on results from both 116 // first. Therefore, try to build the cursor and notify the listener if it's 118 final Cursor frequentContactsCursor = mFrequentContactsCursorBuilder.build() [all...] |
| /packages/experimental/LoaderApp/src/com/android/loaderapp/util/ |
| DataStatus.java | 21 import android.database.Cursor; 29 * {@link #possibleUpdate(Cursor)} to consider updating when a better status 44 public DataStatus(Cursor cursor) { 45 // When creating from cursor row, fill normally 46 fromCursor(cursor); 51 * current row of the given {@link Cursor}. 53 public void possibleUpdate(Cursor cursor) { 54 final boolean hasStatus = !isNull(cursor, Data.STATUS) [all...] |
| /packages/apps/Gallery2/src/com/android/photos/ |
| AlbumFragment.java | 23 import android.database.Cursor; 43 public class AlbumFragment extends MultiSelectGridFragment implements LoaderCallbacks<Cursor> { 49 private LoaderCompatShim<Cursor> mLoaderCompatShim; 108 Cursor item = (Cursor) getItemAtPosition(position); 116 public Loader<Cursor> onCreateLoader(int id, Bundle args) { 125 public void onLoadFinished(Loader<Cursor> loader, 126 Cursor data) { 133 public void onLoaderReset(Loader<Cursor> loader) { 138 return ((Cursor) item).getInt(PhotoSetLoader.INDEX_MEDIA_TYPE) [all...] |
| /packages/apps/Messaging/src/com/android/messaging/ui/contact/ |
| ContactRecipientAdapter.java | 19 import android.database.Cursor; 108 * Returns a cursor containing the filtered results in contacts given the search text, 124 final Cursor personalFilterPhonesCursor = ContactUtil 126 final Cursor personalFilterEmailsCursor = ContactUtil 128 final Cursor personalCursor = new MergeCursor( 129 new Cursor[]{personalFilterEmailsCursor, personalFilterPhonesCursor}); 134 final Cursor enterpriseFilterPhonesCursor = ContactUtil.filterPhonesEnterprise( 136 final Cursor enterpriseFilterEmailsCursor = ContactUtil.filterEmailsEnterprise( 138 final Cursor enterpriseCursor = new MergeCursor( 139 new Cursor[]{enterpriseFilterEmailsCursor [all...] |
| /developers/build/prebuilts/gradle/BasicContactables/Application/src/main/java/com/example/android/basiccontactables/ |
| ContactablesLoaderCallbacks.java | 23 import android.database.Cursor; 34 public class ContactablesLoaderCallbacks implements LoaderManager.LoaderCallbacks<Cursor> { 47 public Loader<Cursor> onCreateLoader(int loaderIndex, Bundle args) { 80 public void onLoadFinished(Loader<Cursor> arg0, Cursor cursor) { 93 if (cursor.getCount() == 0) { 97 // Pulling the relevant value from the cursor requires knowing the column index to pull 100 int phoneColumnIndex = cursor.getColumnIndex(CommonDataKinds.Phone.NUMBER); 101 int emailColumnIndex = cursor.getColumnIndex(CommonDataKinds.Email.ADDRESS) [all...] |
| /developers/samples/android/content/contacts/BasicContactables/Application/src/main/java/com/example/android/basiccontactables/ |
| ContactablesLoaderCallbacks.java | 23 import android.database.Cursor; 34 public class ContactablesLoaderCallbacks implements LoaderManager.LoaderCallbacks<Cursor> { 47 public Loader<Cursor> onCreateLoader(int loaderIndex, Bundle args) { 80 public void onLoadFinished(Loader<Cursor> arg0, Cursor cursor) { 93 if (cursor.getCount() == 0) { 97 // Pulling the relevant value from the cursor requires knowing the column index to pull 100 int phoneColumnIndex = cursor.getColumnIndex(CommonDataKinds.Phone.NUMBER); 101 int emailColumnIndex = cursor.getColumnIndex(CommonDataKinds.Email.ADDRESS) [all...] |
| /development/samples/browseable/BasicContactables/src/com.example.android.basiccontactables/ |
| ContactablesLoaderCallbacks.java | 23 import android.database.Cursor; 34 public class ContactablesLoaderCallbacks implements LoaderManager.LoaderCallbacks<Cursor> { 47 public Loader<Cursor> onCreateLoader(int loaderIndex, Bundle args) { 80 public void onLoadFinished(Loader<Cursor> arg0, Cursor cursor) { 93 if (cursor.getCount() == 0) { 97 // Pulling the relevant value from the cursor requires knowing the column index to pull 100 int phoneColumnIndex = cursor.getColumnIndex(CommonDataKinds.Phone.NUMBER); 101 int emailColumnIndex = cursor.getColumnIndex(CommonDataKinds.Email.ADDRESS) [all...] |
| /frameworks/base/tests/LocationTracker/src/com/android/locationtracker/data/ |
| TrackerDataHelper.java | 20 import android.database.Cursor; 106 * @return Cursor to data 108 public Cursor query(String tag, int limit) { 111 Cursor cursor = mContext.getContentResolver().query( local 114 if (cursor == null) { 115 return cursor; 117 int pos = (cursor.getCount() < limit ? 0 : cursor.getCount() - limit); 118 cursor.moveToPosition(pos) [all...] |
| /packages/apps/ContactsCommon/tests/src/com/android/contacts/common/list/ |
| ContactListItemViewTest.java | 19 import android.database.Cursor; 57 Cursor cursor = createCursor("John Doe", "Doe John"); local 60 view.showDisplayName(cursor, 0, ContactsPreferences.DISPLAY_ORDER_PRIMARY); 66 Cursor cursor = createCursor("", ""); local 70 view.showDisplayName(cursor, 0, ContactsPreferences.DISPLAY_ORDER_PRIMARY); 76 Cursor cursor = createCursor("John Doe", "Doe John"); local 80 view.showDisplayName(cursor, 0, ContactsPreferences.DISPLAY_ORDER_PRIMARY) 91 Cursor cursor = createCursor("John Doe", "Doe John"); local 129 MatrixCursor cursor = new MatrixCursor(new String[]{"Name", "AlternateName"}); local [all...] |
| /packages/apps/Gallery2/src/com/android/photos/data/ |
| PhotoSetLoader.java | 22 import android.database.Cursor; 34 public class PhotoSetLoader extends CursorLoader implements LoaderCompatShim<Cursor> { 84 public Drawable drawableForItem(Cursor item, Drawable recycle) { 97 public Uri uriForItem(Cursor item) { 102 public ArrayList<Uri> urisForSubItems(Cursor item) { 112 public Object getPathForItem(Cursor item) {
|
| /packages/apps/Messaging/tests/src/com/android/messaging/datamodel/ |
| FrequentContactsCursorBuilderTest.java | 18 import android.database.Cursor; 28 private void verifyBuiltCursor(final Cursor expected, final Cursor actual) { 65 final Cursor cursor = new FrequentContactsCursorBuilder() local 69 assertNotNull(cursor); 70 verifyBuiltCursor(TestDataFactory.getFrequentContactListCursor(), cursor); local 75 final Cursor firstCursor = builder 83 final Cursor secondCursor = builder
|
| /packages/apps/ContactsCommon/src/com/android/contacts/common/list/ |
| ContactListAdapter.java | 19 import android.database.Cursor; 35 * A cursor adapter for the {@link ContactsContract.Contacts#CONTENT_TYPE} content type. 160 return ((Cursor) getItem(position)).getString(ContactQuery.CONTACT_DISPLAY_NAME); 169 Cursor item = (Cursor)getItem(position); 173 public Uri getContactUri(int partitionIndex, Cursor cursor) { 174 long contactId = cursor.getLong(ContactQuery.CONTACT_ID); 175 String lookupKey = cursor.getString(ContactQuery.CONTACT_LOOKUP_KEY); 186 final Cursor cursor = (Cursor) getItem(position) local 291 Cursor cursor = null; local 352 Cursor cursor = getCursor(i); local [all...] |