Searched defs:cursor (Results 1 - 25 of 47) sorted by relevance

12

/frameworks/base/core/java/android/content/
H A DCursorEntityIterator.java23 * Abstract implementation of EntityIterator that makes it easy to wrap a cursor
32 * Constructor that makes initializes the cursor such that the iterator points to the
34 * @param cursor the cursor that contains the rows that make up the entities
36 public CursorEntityIterator(Cursor cursor) { argument
38 mCursor = cursor;
43 * Returns the entity that the cursor is currently pointing to. This must take care to advance
44 * the cursor past this entity. This will never be called if the cursor is at the end.
45 * @param cursor th
49 getEntityAndIncrementCursor(Cursor cursor) argument
[all...]
H A DContentQueryMap.java28 * Caches the contents of a cursor into a Map of String->ContentValues and optionally
29 * keeps the cache fresh by registering for updates on the content backing the cursor. The column of
33 * The cursor data is accessed by row key and column name via getValue().
47 /** Set when a cursor change notification is received and is cleared on a call to requery(). */
51 * Creates a ContentQueryMap that caches the content backing the cursor
53 * @param cursor the cursor whose contents should be cached
55 * @param keepUpdated true if the cursor's ContentProvider should be monitored for changes and
62 public ContentQueryMap(Cursor cursor, String columnNameOfKey, boolean keepUpdated, argument
64 mCursor = cursor;
[all...]
H A DAsyncQueryHandler.java77 Cursor cursor;
79 cursor = resolver.query(args.uri, args.projection,
82 // Calling getCount() causes the cursor window to be filled,
84 if (cursor != null) {
85 cursor.getCount();
89 cursor = null;
92 args.result = cursor;
284 * @param cursor The cursor holding the results from the query.
286 protected void onQueryComplete(int token, Object cookie, Cursor cursor) { argument
[all...]
/frameworks/base/core/java/android/database/sqlite/
H A DSQLiteCursorDriver.java46 void cursorRequeried(Cursor cursor); argument
H A DSQLiteDirectCursorDriver.java23 * A cursor driver that uses the given query directly.
51 // Create the cursor
82 public void cursorRequeried(Cursor cursor) { argument
H A DSqliteWrapper.java67 public static boolean requery(Context context, Cursor cursor) { argument
69 return cursor.requery();
/frameworks/base/core/java/android/text/util/
H A DRfc822Tokenizer.java51 int cursor = text.length();
53 while (i < cursor) {
59 while (i < cursor && text.charAt(i) == ' ') {
81 while (i < cursor) {
88 if (i + 1 < cursor) {
101 while (i < cursor && level > 0) {
116 if (i + 1 < cursor) {
128 while (i < cursor) {
210 public int findTokenStart(CharSequence text, int cursor) { argument
213 * we reach the cursor
241 findTokenEnd(CharSequence text, int cursor) argument
[all...]
/frameworks/base/core/tests/coretests/src/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...]
H A DDatabaseCursorTest.java153 // use cursor to access blob
209 // The cursor should ignore text before the last period when looking for a column. (This
325 public TestObserver(int total_, SQLiteCursor cursor) { argument
326 c = cursor;
492 // if cursor window size changed, adjust this value too
523 // if cursor window size changed, adjust this value too
628 // Our hacked requery() changes the query arguments in the cursor.
637 // Test that setting query args on a deactivated cursor also works.
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/data/
H A DTrackerListHelper.java50 Cursor cursor = mActivity.managedQuery(TrackerProvider.CONTENT_URI,
53 TrackerAdapter adapter = new TrackerAdapter(mActivity, layout, cursor);
55 cursor.setNotificationUri(mActivity.getContentResolver(),
67 public void bindView(View view, Context context, Cursor cursor) { argument
71 .createEntry(cursor));
H A DTrackerDataHelper.java111 Cursor cursor = mContext.getContentResolver().query(
114 if (cursor == null) {
115 return cursor;
117 int pos = (cursor.getCount() < limit ? 0 : cursor.getCount() - limit);
118 cursor.moveToPosition(pos);
119 return cursor;
123 * Retrieves a cursor that starts at the last limit rows
126 * @return a cursor, null if bad things happened
158 * Helper method which converts row referenced by given cursor t
165 getNextOutput(Cursor cursor) argument
[all...]
/frameworks/base/core/java/android/widget/
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 DResourceCursorAdapter.java60 * @param c The cursor from which to get the data.
62 * cursor whenever it changes so the most recent
78 public View newView(Context context, Cursor cursor, ViewGroup parent) { argument
83 public View newDropDownView(Context context, Cursor cursor, ViewGroup parent) { argument
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 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 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;
H A DSimpleCursorAdapter.java25 * An easy adapter to map columns from a cursor to TextViews or ImageViews
75 * @param c The database cursor. Can be null if the cursor is not available yet.
77 * if the cursor is not available yet.
81 * parameter. Can be null if the cursor is not available yet.
92 * constructor with their corresponding cursor columns as specified in the
115 public void bindView(View view, Context context, Cursor cursor) { argument
126 bound = binder.setViewValue(v, cursor, from[i]);
130 String text = cursor.getString(from[i]);
186 * @param value the value retrieved from the cursor
288 convertToString(Cursor cursor) argument
371 setViewValue(View view, Cursor cursor, int columnIndex) argument
389 convertToString(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...]
/frameworks/base/core/java/com/google/android/mms/util/
H A DSqliteWrapper.java79 public static boolean requery(Context context, Cursor cursor) { argument
81 return cursor.requery();
/frameworks/base/core/tests/coretests/src/android/app/
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);
/frameworks/base/core/java/android/database/
H A DCursorJoiner.java59 /** 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
104 * @param cursor the cursor that contains the columns
108 private int[] buildColumnIndiciesArray(Cursor cursor, String[] columnNames) { argument
111 columns[i] = cursor
204 populateValues(String[] values, Cursor cursor, int[] columnIndicies, int startingIndex) argument
[all...]
H A DCursorToBulkCursorAdaptor.java78 public CursorToBulkCursorAdaptor(Cursor cursor, IContentObserver observer, String providerName, argument
81 mCursor = (CrossProcessCursor) cursor;
83 AbstractWindowedCursor windowedCursor = (AbstractWindowedCursor) cursor;
86 Log.v(TAG, "Cross process cursor has a local window before setWindow in "
179 * underlying cursor.
180 * @param observer the IContentObserver that wants to monitor the cursor
/frameworks/base/core/java/android/pim/
H A DRecurrenceSet.java64 * CalendarProvider. The cursor must contain the RRULE, RDATE, EXRULE,
67 * @param cursor The cursor containing the RRULE, RDATE, EXRULE, and EXDATE
70 public RecurrenceSet(Cursor cursor) argument
72 int rruleColumn = cursor.getColumnIndex(Calendar.Events.RRULE);
73 int rdateColumn = cursor.getColumnIndex(Calendar.Events.RDATE);
74 int exruleColumn = cursor.getColumnIndex(Calendar.Events.EXRULE);
75 int exdateColumn = cursor.getColumnIndex(Calendar.Events.EXDATE);
76 String rruleStr = cursor.getString(rruleColumn);
77 String rdateStr = cursor
234 populateComponent(Cursor cursor, ICalendar.Component component) argument
[all...]
/frameworks/base/test-runner/src/android/test/
H A DTestListActivity.java139 MatrixCursor cursor = new MatrixCursor(new String[] { "name", "_id" });
140 addTestRows(cursor);
145 cursor,
152 private void addTestRows(MatrixCursor cursor) { argument
154 cursor.newRow().add("Run All").add(id++);
161 cursor.newRow().add(prefix + title).add(id++);
/frameworks/base/core/java/android/util/
H A DCalendarUtils.java89 protected void onQueryComplete(int token, Object cookie, Cursor cursor) { argument
93 int keyColumn = cursor.getColumnIndexOrThrow(CalendarCache.KEY);
94 int valueColumn = cursor.getColumnIndexOrThrow(CalendarCache.VALUE);
95 while(cursor.moveToNext()) {
96 String key = cursor.getString(keyColumn);
97 String value = cursor.getString(valueColumn);
113 cursor.close();

Completed in 345 milliseconds

12