Searched refs:cursor (Results 1 - 25 of 29) sorted by relevance

12

/development/samples/VoicemailProviderDemo/src/com/example/android/voicemail/common/utils/
H A DCloseUtils.java44 /** 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 DContactAccessorSdk5.java63 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 DContactAccessorSdk3_4.java57 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 DVoicemailProviderHelpers.java161 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 DAutoComplete4.java44 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 DAutoComplete5.java35 Cursor cursor = content.query(Contacts.CONTENT_URI,
38 new AutoComplete4.ContactListAdapter(this, cursor);
H A DList3.java29 * 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 DExpandableList2.java59 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 DUrlImageBinder.java38 public boolean bind(View view, Cursor cursor, int columnIndex) { argument
40 final String url = mTransformation.transform(cursor, columnIndex);
H A DAdapters.java56 * <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>&lt;cursor-adapter /&gt;</code></a>
67 * <li><a href="#xml-cursor-adapter-select-tag"><code>&lt;select /&gt;</code></a></li>
68 * <li><a href="#xml-cursor-adapter-bind-tag"><code>&lt;bind /&gt;</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 DContactPhotoBinder.java36 * 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 DWordActivity.java49 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 DDictionaryDatabase.java144 Cursor cursor = builder.query(mDatabaseOpenHelper.getReadableDatabase(),
147 if (cursor == null) {
149 } else if (!cursor.moveToFirst()) {
150 cursor.close();
153 return cursor;
H A DSearchableDictionary.java88 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 DRSSPullService.java81 // 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 DPhotoThumbnailFragment.java84 // 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 DSmsMessageReceiver.java57 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 DNotePadProviderTest.java369 // 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 DQuickContactsDemo.java76 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 DAlertDialogSamples.java263 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 DNotesList.java58 * 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 DContactManager.java87 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 DContactManager.java74 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 Dandroid-support-v4.jar ... content public android.support.v4.content.Cursor
/development/samples/training/basic/ActivityLifecycle/libs/
H A Dandroid-support-v13.jarMETA-INF/ META-INF/MANIFEST.MF android/ android/support/ android/support/v13/ android/support/v13/app/ ...

Completed in 763 milliseconds

12