/development/samples/VoicemailProviderDemo/src/com/example/android/voicemail/common/utils/ |
H A D | CloseUtils.java | 44 /** If the argument is non-null, close the cursor. */ 45 public static void closeQuietly(Cursor cursor) { argument 46 if (cursor != null) { 47 cursor.close();
|
/development/samples/BusinessCard/src/com/example/android/businesscard/ |
H A D | ContactAccessorSdk5.java | 63 Cursor cursor = contentResolver.query(contactUri, 66 if (cursor.moveToFirst()) { 67 contactId = cursor.getLong(0); 68 contactInfo.setDisplayName(cursor.getString(1)); 71 cursor.close(); 75 cursor = contentResolver.query(Phone.CONTENT_URI, 79 if (cursor.moveToFirst()) { 80 contactInfo.setPhoneNumber(cursor.getString(0)); 83 cursor.close();
|
H A D | ContactAccessorSdk3_4.java | 57 Cursor cursor = contentResolver.query(contactUri, 60 if (cursor.moveToFirst()) { 61 contactInfo.setDisplayName(cursor.getString(0)); 64 cursor.close(); 68 cursor = contentResolver.query(phoneUri, 72 if (cursor.moveToFirst()) { 73 contactInfo.setPhoneNumber(cursor.getString(0)); 76 cursor.close();
|
/development/samples/VoicemailProviderDemo/src/com/example/android/voicemail/common/core/ |
H A D | VoicemailProviderHelpers.java | 161 Cursor cursor = null; 163 cursor = mContentResolver.query(mBaseUri, FULL_PROJECTION, 166 if (cursor.getCount() != 1) { 168 cursor.getCount()); 171 cursor.moveToFirst(); 172 return getVoicemailFromCursor(cursor); 174 CloseUtils.closeQuietly(cursor); 180 Cursor cursor = null; 182 cursor = mContentResolver.query(uri, FULL_PROJECTION, null, null, null); 183 if (cursor 271 getVoicemailFromCursor(Cursor cursor) argument [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/view/ |
H A D | AutoComplete4.java | 44 Cursor cursor = content.query(Contacts.CONTENT_URI, 47 ContactListAdapter adapter = new ContactListAdapter(this, cursor); 63 public View newView(Context context, Cursor cursor, ViewGroup parent) { argument 67 view.setText(cursor.getString(COLUMN_DISPLAY_NAME)); 72 public void bindView(View view, Context context, Cursor cursor) { argument 73 ((TextView) view).setText(cursor.getString(COLUMN_DISPLAY_NAME)); 77 public String convertToString(Cursor cursor) { argument 78 return cursor.getString(COLUMN_DISPLAY_NAME);
|
H A D | AutoComplete5.java | 35 Cursor cursor = content.query(Contacts.CONTENT_URI, 38 new AutoComplete4.ContactListAdapter(this, cursor);
|
H A D | List3.java | 29 * data comes from a cursor, and a 39 // Get a cursor with all phones 54 public boolean setViewValue(View view, Cursor cursor, int columnIndex) { 59 int type = cursor.getInt(COLUMN_TYPE); 63 label = cursor.getString(COLUMN_LABEL);
|
H A D | ExpandableList2.java | 59 protected void onQueryComplete(int token, Object cookie, Cursor cursor) { argument 62 mAdapter.setGroupCursor(cursor); 67 mAdapter.setChildrenCursor(groupPosition, cursor); 87 // Given the group, we return a cursor for all the children within that group 89 // Return a cursor that points to this contact's phone numbers 133 // Null out the group cursor. This will cause the group cursor and all of the child cursors
|
/development/samples/XmlAdapters/src/com/example/android/xmladapters/ |
H A D | UrlImageBinder.java | 38 public boolean bind(View view, Cursor cursor, int columnIndex) { argument 40 final String url = mTransformation.transform(cursor, columnIndex);
|
H A D | Adapters.java | 56 * <li><a href="#xml-cursor-adapter">Cursor adapter</a>: a cursor adapter can be used 57 * to display the content of a cursor, most often coming from a content provider</li> 61 * <a name="xml-cursor-adapter"></a> 63 * <p>A cursor adapter XML definition starts with the 64 * <a href="#xml-cursor-adapter-tag"><code><cursor-adapter /></code></a> 67 * <li><a href="#xml-cursor-adapter-select-tag"><code><select /></code></a></li> 68 * <li><a href="#xml-cursor-adapter-bind-tag"><code><bind /></code></a></li> 71 * <a name="xml-cursor 321 bind(View view, Cursor cursor, int columnIndex) argument 362 transform(Cursor cursor, int columnIndex) argument 374 transformToResource(Cursor cursor, int columnIndex) argument 445 loadCursorAdapter(Context context, int id, Cursor cursor, Object... parameters) argument 940 bindView(View view, Context context, Cursor cursor) argument 986 onPostExecute(Cursor cursor) argument 1004 transform(Cursor cursor, int columnIndex) argument 1057 transform(Cursor cursor, int columnIndex) argument 1073 asString(Cursor cursor) argument 1084 asString(Cursor cursor) argument 1099 asString(Cursor cursor) argument 1133 transform(Cursor cursor, int columnIndex) argument 1140 transformToResource(Cursor cursor, int columnIndex) argument 1160 bind(View view, Cursor cursor, int columnIndex) argument 1179 bind(View view, Cursor cursor, int columnIndex) argument 1196 bind(View view, Cursor cursor, int columnIndex) argument 1212 bind(View view, Cursor cursor, int columnIndex) argument 1231 bind(View view, Cursor cursor, int columnIndex) argument [all...] |
H A D | ContactPhotoBinder.java | 36 * This custom cursor binder is used by the adapter defined in res/xml to 63 public boolean bind(View view, Cursor cursor, int columnIndex) { argument 64 final long id = cursor.getLong(columnIndex);
|
/development/samples/SearchableDictionary/src/com/example/android/searchabledict/ |
H A D | WordActivity.java | 49 Cursor cursor = managedQuery(uri, null, null, null, null); 51 if (cursor == null) { 54 cursor.moveToFirst(); 59 int wIndex = cursor.getColumnIndexOrThrow(DictionaryDatabase.KEY_WORD); 60 int dIndex = cursor.getColumnIndexOrThrow(DictionaryDatabase.KEY_DEFINITION); 62 word.setText(cursor.getString(wIndex)); 63 definition.setText(cursor.getString(dIndex));
|
H A D | DictionaryDatabase.java | 144 Cursor cursor = builder.query(mDatabaseOpenHelper.getReadableDatabase(), 147 if (cursor == null) { 149 } else if (!cursor.moveToFirst()) { 150 cursor.close(); 153 return cursor;
|
H A D | SearchableDictionary.java | 88 Cursor cursor = managedQuery(DictionaryProvider.CONTENT_URI, null, null, 91 if (cursor == null) { 96 int count = cursor.getCount(); 109 // Create a simple cursor adapter for the definitions and apply them to the ListView 111 R.layout.result, cursor, from, to);
|
/development/samples/training/threadsample/src/com/example/android/threadsample/ |
H A D | RSSPullService.java | 81 // A cursor that's local to this method. 82 Cursor cursor = null; 115 cursor = getContentResolver().query( 128 if (null != cursor && cursor.moveToFirst()) { 132 cursor.getLong(cursor.getColumnIndex( 233 cursor.getString(cursor.getColumnIndex( 259 // If an exception occurred, close the cursor t [all...] |
H A D | PhotoThumbnailFragment.java | 84 // Constants that define the order of columns in the returned cursor 280 // Returns a one-row cursor for the data that backs the View that was clicked. 281 Cursor cursor = (Cursor) mAdapter.getItem(viewId); 283 // Retrieves the urlString from the cursor 284 String urlString = cursor.getString(IMAGE_URL_CURSOR_INDEX); 365 * @param cursor The Cursor to bind to the View, representing one row of the returned query. 368 public void bindView(View view, Context context, Cursor cursor) { argument 378 cursor.getString(IMAGE_THUMBURL_CURSOR_INDEX) 402 * @param cursor The Cursor to display. This is a single row of the returned query 407 public View newView(Context context, Cursor cursor, ViewGrou argument [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/os/ |
H A D | SmsMessageReceiver.java | 57 Cursor cursor = context.getContentResolver().query(uri, projection, null, null, null); 58 if (cursor != null) { 59 if (cursor.moveToFirst()) 60 fromDisplayName = cursor.getString(0); 62 cursor.close();
|
/development/samples/NotePad/tests/src/com/example/android/notepad/ |
H A D | NotePadProviderTest.java | 369 // a) Checks that the cursor is not null 445 // If there are no records in the table, the returned cursor from a query should be empty. 446 Cursor cursor = mMockResolver.query( 454 // Asserts that the returned cursor contains no records 455 assertEquals(0, cursor.getCount()); 458 // If the table contains records, the returned cursor from a query should contain records. 464 cursor = mMockResolver.query( 472 // Asserts that the returned cursor contains the same number of rows as the size of the 474 assertEquals(TEST_NOTES.length, cursor.getCount()); 477 // A query that uses a projection should return a cursor wit [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/app/ |
H A D | QuickContactsDemo.java | 76 public void bindView(View view, Context context, Cursor cursor) { argument 79 cursor.copyStringToBuffer(SUMMARY_NAME_COLUMN_INDEX, cache.nameBuffer); 82 final long contactId = cursor.getLong(SUMMARY_ID_COLUMN_INDEX); 83 final String lookupKey = cursor.getString(SUMMARY_LOOKUP_KEY); 88 public View newView(Context context, Cursor cursor, ViewGroup parent) { argument 89 View view = super.newView(context, cursor, parent);
|
H A D | AlertDialogSamples.java | 263 Cursor cursor = managedQuery(ContactsContract.Contacts.CONTENT_URI, 268 .setMultiChoiceItems(cursor, 377 /* Display a list of checkboxes, backed by a cursor */
|
/development/samples/NotePad/src/com/example/android/notepad/ |
H A D | NotesList.java | 58 * The columns needed by the cursor adapter 98 /* Performs a managed query. The Activity handles closing and requerying the cursor 103 Cursor cursor = managedQuery( 112 * The following two arrays create a "map" between columns in the cursor and view IDs 119 // The names of the cursor columns to display in the view, initialized to the title column 122 // The view IDs that will display the cursor columns, initialized to the TextView in 131 cursor, // The cursor to get items from 136 // Sets the ListView's adapter to be the cursor adapter that was just created. 322 Cursor cursor [all...] |
/development/samples/ContactManager/src/com/example/android/contactmanager/ |
H A D | ContactManager.java | 87 Cursor cursor = getContacts(); 91 SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.contact_entry, cursor, 99 * @return A cursor for for accessing the contact list.
|
/development/samples/SampleSyncAdapter/src/com/example/android/samplesync/platform/ |
H A D | ContactManager.java | 74 final Cursor cursor = resolver.query(Groups.CONTENT_URI, new String[] { Groups._ID }, 78 if (cursor != null) { 80 if (cursor.moveToFirst()) { 81 groupId = cursor.getLong(0); 84 cursor.close();
|
/development/samples/training/multiscreen/newsreader/libs/ |
H A D | android-support-v4.jar | ... content public android.support.v4.content.Cursor |
/development/samples/training/basic/ActivityLifecycle/libs/ |
H A D | android-support-v13.jar | META-INF/ META-INF/MANIFEST.MF android/ android/support/ android/support/v13/ android/support/v13/app/ ... |