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

123

/frameworks/base/tests/CoreTests/android/database/
H A DMatrixCursorTest.java26 Cursor cursor = new MatrixCursor(new String[] { "a" });
27 assertEquals(0, cursor.getCount());
31 MatrixCursor cursor = new MatrixCursor(new String[] { "a" });
32 cursor.newRow().add(null);
33 cursor.moveToNext();
34 assertTrue(cursor.isNull(0));
35 assertNull(cursor.getString(0));
36 assertEquals(0, cursor.getShort(0));
37 assertEquals(0, cursor.getInt(0));
38 assertEquals(0L, cursor
143 checkValues(MatrixCursor cursor) argument
[all...]
/frameworks/base/core/java/android/widget/
H A DResourceCursorTreeAdapter.java41 * @param cursor The database cursor
51 public ResourceCursorTreeAdapter(Context context, Cursor cursor, int collapsedGroupLayout, argument
53 super(cursor, context);
68 * @param cursor The database cursor
76 public ResourceCursorTreeAdapter(Context context, Cursor cursor, int collapsedGroupLayout, argument
78 this(context, cursor, collapsedGroupLayout, expandedGroupLayout, childLayout, childLayout);
86 * @param cursor The database cursor
92 ResourceCursorTreeAdapter(Context context, Cursor cursor, int groupLayout, int childLayout) argument
98 newChildView(Context context, Cursor cursor, boolean isLastChild, ViewGroup parent) argument
104 newGroupView(Context context, Cursor cursor, boolean isExpanded, ViewGroup parent) argument
[all...]
H A DCursorTreeAdapter.java45 /** The cursor helper that is used to get the groups */
49 * The map of a group position to the group's children cursor helper (the
50 * cursor helper that is used to get the children for that group)
59 * Constructor. The adapter will call {@link Cursor#requery()} on the cursor whenever
62 * @param cursor The cursor from which to get the data for the groups.
64 public CursorTreeAdapter(Cursor cursor, Context context) { argument
65 init(cursor, context, true);
71 * @param cursor The cursor fro
77 CursorTreeAdapter(Cursor cursor, Context context, boolean autoRequery) argument
81 init(Cursor cursor, Context context, boolean autoRequery) argument
139 setGroupCursor(Cursor cursor) argument
220 newGroupView(Context context, Cursor cursor, boolean isExpanded, ViewGroup parent) argument
232 bindGroupView(View view, Context context, Cursor cursor, boolean isExpanded) argument
264 newChildView(Context context, Cursor cursor, boolean isLastChild, ViewGroup parent) argument
276 bindChildView(View view, Context context, Cursor cursor, boolean isLastChild) argument
342 convertToString(Cursor cursor) argument
381 changeCursor(Cursor cursor) argument
407 MyCursorHelper(Cursor cursor) argument
452 changeCursor(Cursor cursor, boolean releaseCursors) argument
[all...]
H A DSimpleCursorTreeAdapter.java25 * An easy adapter to map columns from a cursor to TextViews or ImageViews
68 * @param cursor The database cursor
95 public SimpleCursorTreeAdapter(Context context, Cursor cursor, int collapsedGroupLayout, argument
98 super(context, cursor, collapsedGroupLayout, expandedGroupLayout, childLayout,
109 * @param cursor The database cursor
132 public SimpleCursorTreeAdapter(Context context, Cursor cursor, int collapsedGroupLayout, argument
135 super(context, cursor, collapsedGroupLayout, expandedGroupLayout, childLayout);
145 * @param cursor Th
165 SimpleCursorTreeAdapter(Context context, Cursor cursor, int groupLayout, String[] groupFrom, int[] groupTo, int childLayout, String[] childFrom, int[] childTo) argument
192 initFromColumns(Cursor cursor, String[] fromColumnNames, int[] fromColumns) argument
231 bindView(View view, Context context, Cursor cursor, int[] from, int[] to) argument
261 bindChildView(View view, Context context, Cursor cursor, boolean isLastChild) argument
266 bindGroupView(View view, Context context, Cursor cursor, boolean isExpanded) argument
327 setViewValue(View view, Cursor cursor, int columnIndex) argument
[all...]
H A DCursorFilter.java32 CharSequence convertToString(Cursor cursor); argument
35 void changeCursor(Cursor cursor); argument
49 Cursor cursor = mClient.runQueryOnBackgroundThread(constraint);
52 if (cursor != null) {
53 results.count = cursor.getCount();
54 results.values = cursor;
H A DAlphabetIndexer.java28 * invalidates the cache if changes occur in the cursor.
30 * Your adapter is responsible for updating the cursor by calling {@link #setCursor} if the
31 * cursor changes. {@link #getPositionForSection} method does the binary search for the starting
42 * The index of the cursor column that this list is sorted on.
58 * the dataset changes or the cursor changes.
74 * @param cursor the cursor containing the data set
75 * @param sortedColumnIndex the column number in the cursor that is sorted
82 public AlphabetIndexer(Cursor cursor, int sortedColumnIndex, CharSequence alphabet) { argument
83 mDataCursor = cursor;
112 setCursor(Cursor cursor) argument
[all...]
H A DCursorAdapter.java83 * Constructor. The adapter will call requery() on the cursor whenever
86 * @param c The cursor from which to get the data.
95 * @param c The cursor from which to get the data.
98 * cursor whenever it changes so the most recent
120 * Returns the cursor.
121 * @return the cursor.
175 throw new IllegalStateException("this should only be called when the cursor is valid");
178 throw new IllegalStateException("couldn't move cursor to position " + position);
208 * Makes a new view to hold the data pointed to by cursor.
210 * @param cursor Th
215 newView(Context context, Cursor cursor, ViewGroup parent) argument
225 newDropDownView(Context context, Cursor cursor, ViewGroup parent) argument
236 bindView(View view, Context context, Cursor cursor) argument
244 changeCursor(Cursor cursor) argument
278 convertToString(Cursor cursor) argument
[all...]
H A DSimpleCursorAdapter.java28 * An easy adapter to map columns from a cursor to TextViews or ImageViews
79 * @param c The database cursor. Can be null if the cursor is not available yet.
81 * if the cursor is not available yet.
85 * parameter. Can be null if the cursor is not available yet.
95 public View newView(Context context, Cursor cursor, ViewGroup parent) { argument
96 return generateViewHolder(super.newView(context, cursor, parent));
100 public View newDropDownView(Context context, Cursor cursor, ViewGroup parent) { argument
101 return generateViewHolder(super.newDropDownView(context, cursor, parent));
119 * constructor with their corresponding cursor column
142 bindView(View view, Context context, Cursor cursor) argument
315 convertToString(Cursor cursor) argument
398 setViewValue(View view, Cursor cursor, int columnIndex) argument
416 convertToString(Cursor cursor) argument
[all...]
H A DQuickContactBadge.java221 protected void onQueryComplete(int token, Object cookie, Cursor cursor) { argument
233 if (cursor != null && cursor.moveToFirst()) {
234 long contactId = cursor.getLong(PHONE_ID_COLUMN_INDEX);
235 String lookupKey = cursor.getString(PHONE_LOOKUP_STRING_COLUMN_INDEX);
246 if (cursor != null && cursor.moveToFirst()) {
247 long contactId = cursor.getLong(EMAIL_ID_COLUMN_INDEX);
248 String lookupKey = cursor.getString(EMAIL_LOOKUP_STRING_COLUMN_INDEX);
254 if (cursor !
[all...]
H A DMultiAutoCompleteTextView.java213 * <code>cursor</code> within <code>text</code>.
215 public int findTokenStart(CharSequence text, int cursor); argument
219 * that begins at offset <code>cursor</code> within <code>text</code>.
221 public int findTokenEnd(CharSequence text, int cursor); argument
235 public int findTokenStart(CharSequence text, int cursor) { argument
236 int i = cursor;
241 while (i < cursor && text.charAt(i) == ' ') {
248 public int findTokenEnd(CharSequence text, int cursor) { argument
249 int i = cursor;
/frameworks/base/awt/org/apache/harmony/awt/wtk/
H A DCursorFactory.java41 * @return created cursor
46 * Gets a cached instance of system(predefined) native cursor
50 * @return created cursor
54 NativeCursor cursor = systemCursors[type];
55 if (cursor == null) {
56 cursor = createCursor(type);
57 systemCursors[type] = cursor;
59 return cursor;
66 * @param img - image(source) to create cursor from
69 * @return created cursor
[all...]
/frameworks/base/core/java/android/database/sqlite/
H A DSQLiteContentHelper.java71 Cursor cursor = db.rawQuery(sql, selectionArgs);
72 if (cursor == null) {
76 if (!cursor.moveToFirst()) {
79 byte[] bytes = cursor.getBlob(0);
88 cursor.close();
H A DSQLiteCursorDriver.java46 void cursorRequeried(Cursor cursor); argument
/frameworks/base/core/java/android/database/
H A DDatabaseUtils.java321 * @param cursor the cursor to print
323 public static void dumpCursor(Cursor cursor) { argument
324 dumpCursor(cursor, System.out);
331 * @param cursor the cursor to print
334 public static void dumpCursor(Cursor cursor, PrintStream stream) { argument
335 stream.println(">>>>> Dumping cursor " + cursor);
336 if (cursor !
355 dumpCursor(Cursor cursor, StringBuilder sb) argument
376 dumpCursorToString(Cursor cursor) argument
387 dumpCurrentRow(Cursor cursor) argument
397 dumpCurrentRow(Cursor cursor, PrintStream stream) argument
421 dumpCurrentRow(Cursor cursor, StringBuilder sb) argument
445 dumpCurrentRowToString(Cursor cursor) argument
458 cursorStringToContentValues(Cursor cursor, String field, ContentValues values) argument
471 cursorStringToInsertHelper(Cursor cursor, String field, InsertHelper inserter, int index) argument
484 cursorStringToContentValues(Cursor cursor, String field, ContentValues values, String key) argument
496 cursorIntToContentValues(Cursor cursor, String field, ContentValues values) argument
508 cursorIntToContentValues(Cursor cursor, String field, ContentValues values, String key) argument
525 cursorLongToContentValues(Cursor cursor, String field, ContentValues values) argument
538 cursorLongToContentValues(Cursor cursor, String field, ContentValues values, String key) argument
556 cursorDoubleToCursorValues(Cursor cursor, String field, ContentValues values) argument
569 cursorDoubleToContentValues(Cursor cursor, String field, ContentValues values, String key) argument
585 cursorRowToContentValues(Cursor cursor, ContentValues values) argument
[all...]
/frameworks/base/telephony/java/com/android/internal/telephony/
H A DCallerInfo.java116 * @param cursor the first object in the cursor is used to build the CallerInfo object.
120 public static CallerInfo getCallerInfo(Context context, Uri contactRef, Cursor cursor) { argument
131 if (Config.LOGV) Log.v(TAG, "construct callerInfo from cursor");
133 if (cursor != null) {
134 if (cursor.moveToFirst()) {
139 columnIndex = cursor.getColumnIndex(PhoneLookup.DISPLAY_NAME);
141 info.name = cursor.getString(columnIndex);
145 columnIndex = cursor.getColumnIndex(PhoneLookup.NUMBER);
147 info.phoneNumber = cursor
[all...]
H A DDataLinkInterface.java74 * @param cursor cursor to carriers table
76 void setPasswordInfo(Cursor cursor); argument
/frameworks/base/tests/AndroidTests/src/com/android/unit_tests/
H A DSuggestionProvider.java69 MatrixCursor cursor = new MatrixCursor(COLUMNS);
72 addRow(cursor, query + suffix);
74 return cursor;
80 private void addRow(MatrixCursor cursor, String string) { argument
81 long id = cursor.getCount();
82 cursor.newRow().add(id).add(string).add(Intent.ACTION_SEARCH).add(string);
H A DDatabaseLocaleTest.java111 Cursor cursor = null;
115 cursor = mDatabase.rawQuery("SELECT data FROM test WHERE id = 1", null);
117 assertNotNull(cursor);
118 assertTrue(cursor.moveToFirst());
119 String actualString = cursor.getString(0);
126 if (cursor != null) cursor.close();
/frameworks/base/core/java/android/webkit/
H A DWebViewDatabase.java366 Cursor cursor = mDatabase.query(mTableNames[tableId], ID_PROJECTION,
368 boolean ret = cursor.moveToFirst() == true;
369 cursor.close();
397 Cursor cursor = mDatabase.query(mTableNames[TABLE_COOKIES_ID],
400 if (cursor.moveToFirst()) {
401 int domainCol = cursor.getColumnIndex(COOKIES_DOMAIN_COL);
402 int pathCol = cursor.getColumnIndex(COOKIES_PATH_COL);
403 int nameCol = cursor.getColumnIndex(COOKIES_NAME_COL);
404 int valueCol = cursor.getColumnIndex(COOKIES_VALUE_COL);
405 int expiresCol = cursor
[all...]
/frameworks/base/core/java/android/app/
H A DSuggestionsAdapter.java72 // Cached column indexes, updated when the cursor changes.
80 // The extra used to tell a cursor to close itself. This is a hack, see the description by
100 // holds the position that, when displayed, should result in notifying the cursor
118 null, // no initial cursor
173 * Use the search suggestions provider to obtain a live cursor. This will be called
183 * for in app search we show the progress spinner until the cursor is returned with
190 final Cursor cursor = mSearchManager.getSuggestions(mSearchable, query, QUERY_LIMIT);
193 if (!mGlobalSearchMode && cursor != null) cursor.getCount();
194 return cursor;
273 callCursorPostRefresh(Cursor cursor) argument
293 callCursorOnClick(Cursor cursor, int position, int actionKey, String actionMsg) argument
330 newView(Context context, Cursor cursor, ViewGroup parent) argument
355 bindView(View view, Context context, Cursor cursor) argument
418 setViewText(Cursor cursor, TextView v, int textCol, boolean isHtml) argument
450 getIcon1(Cursor cursor) argument
462 getIcon2(Cursor cursor) argument
503 convertToString(Cursor cursor) argument
670 getDefaultIcon1(Cursor cursor) argument
755 getColumnString(Cursor cursor, String columnName) argument
[all...]
/frameworks/base/core/java/android/text/util/
H A DRfc822Tokenizer.java52 int cursor = text.length();
54 while (i < cursor) {
60 while (i < cursor && text.charAt(i) == ' ') {
82 while (i < cursor) {
100 while (i < cursor && level > 0) {
125 while (i < cursor) {
207 public int findTokenStart(CharSequence text, int cursor) { argument
210 * we reach the cursor.
216 while (i < cursor) {
219 if (i < cursor) {
238 findTokenEnd(CharSequence text, int cursor) argument
[all...]
/frameworks/base/awt/java/awt/
H A DCursor.java38 * The Cursor class represents the bitmap of the mouse cursor.
50 * The Constant DEFAULT_CURSOR indicates the default cursor type.
55 * The Constant CROSSHAIR_CURSOR cursor type.
60 * The Constant TEXT_CURSOR cursor type.
65 * The Constant WAIT_CURSOR cursor type.
70 * The Constant SW_RESIZE_CURSOR cursor type.
75 * The Constant SE_RESIZE_CURSOR cursor type.
80 * The Constant NW_RESIZE_CURSOR cursor type.
85 * The Constant NE_RESIZE_CURSOR cursor type.
90 * The Constant N_RESIZE_CURSOR cursor typ
[all...]
/frameworks/base/media/java/android/media/
H A DRingtone.java117 Cursor cursor = null;
137 cursor = res.query(uri, DRM_COLUMNS, null, null, null);
139 cursor = res.query(uri, MEDIA_COLUMNS, null, null, null);
142 if (cursor != null && cursor.getCount() == 1) {
143 cursor.moveToFirst();
144 return cursor.getString(2);
H A DRingtoneManager.java42 * results into a single cursor. It also provides a {@link Ringtone} for each
199 * The column index (in the cursor returned by {@link #getCursor()} for the
205 * The column index (in the cursor returned by {@link #getCursor()} for the
211 * The column index (in the cursor returned by {@link #getCursor()} for the
236 * constructed instance manages cursor(s).
238 * @param activity The activity used to get a managed cursor.
247 * constructor will not manage the cursor(s), so the client should handle
250 * @param context The context to used to get a cursor.
347 * cursor will be the same cursor returne
405 getUriFromCursor(Cursor cursor) argument
472 getValidRingtoneUriFromCursorAndClose(Context context, Cursor cursor) argument
[all...]
/frameworks/base/core/java/android/pim/
H A DRecurrenceSet.java62 * CalendarProvider. The cursor must contain the RRULE, RDATE, EXRULE,
65 * @param cursor The cursor containing the RRULE, RDATE, EXRULE, and EXDATE
68 public RecurrenceSet(Cursor cursor) { argument
69 int rruleColumn = cursor.getColumnIndex(Calendar.Events.RRULE);
70 int rdateColumn = cursor.getColumnIndex(Calendar.Events.RDATE);
71 int exruleColumn = cursor.getColumnIndex(Calendar.Events.EXRULE);
72 int exdateColumn = cursor.getColumnIndex(Calendar.Events.EXDATE);
73 String rruleStr = cursor.getString(rruleColumn);
74 String rdateStr = cursor
227 populateComponent(Cursor cursor, ICalendar.Component component) argument
[all...]

Completed in 1463 milliseconds

123