Cursor requery - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Cursor requery method.

This code example shows how to use the following methods:requery
        } 
    } 
 
    public static boolean requery(Context context, Cursor cursor) {
        try { 
            return cursor.requery();
        } catch (SQLiteException e) {
            Log.e(TAG, "Catch a SQLiteException when requery: ", e);
            checkSQLiteException(context, e);
            return false; 
        } 
    } 
    public static int update(Context context, ContentResolver resolver, Uri uri,
            ContentValues values, String where, String[] selectionArgs) {
        try { 
            return resolver.update(uri, values, where, selectionArgs);
        } catch (SQLiteException e) {
            Log.e(TAG, "Catch a SQLiteException when update: ", e);
            checkSQLiteException(context, e);
            return -1; 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:isClosed, requery
     * 
     * @see ContentObserver#onChange(boolean) 
     */ 
    @SuppressWarnings("deprecation") 
    protected void onContentChanged() { 
        if (mAutoRequery && mCursor != null && !mCursor.isClosed()) {
            mDataValid = mCursor.requery();
        } 
    } 
 
    private class ChangeObserver extends ContentObserver {
 
        public ChangeObserver() { 
            super(new Handler());
        } 
 
        @Override 
        public boolean deliverSelfNotifications() { 
            return true; 
        } 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:requery
    wrappedCursor.deactivate();
  } 
 
  @Implementation 
  public boolean requery() { 
    return wrappedCursor.requery();
  } 
 
  @Implementation 
  public void close() { 
    wrappedCursor.close();
  } 
 
  @Implementation 
  public boolean isClosed() { 
    return wrappedCursor.isClosed();
  } 
 
  @Implementation 
  public void registerContentObserver(ContentObserver contentObserver) {
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:isClosed, requery
        } 
        return mCursor.moveToPosition(index);
    } 
 
    /* package */ void refreshData() { 
        if (mCursor.isClosed()) {
            return; 
        } 
        mCursor.requery();
    } 
 
    public View getGroupView(int groupPosition, boolean isExpanded,
            View convertView, ViewGroup parent) {
        TextView item;
        if (null == convertView || !(convertView instanceof TextView)) {
            LayoutInflater factory = LayoutInflater.from(mContext);
            item = (TextView) factory.inflate(R.layout.list_group_header, null);
        } else { 
            item = (TextView) convertView;
        } 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:requery
        wrappedCursor.deactivate();
    } 
 
    @Implementation 
    public boolean requery() { 
        return wrappedCursor.requery();
    } 
 
    @Implementation 
    public void close() { 
        wrappedCursor.close();
    } 
 
    @Implementation 
    public boolean isClosed() { 
        return wrappedCursor.isClosed();
    } 
 
    @Implementation 
    public void registerContentObserver(ContentObserver contentObserver) {
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:moveToFirst, requery
		super.onDestroy(); 
		mBookmarksCursor.close();
	} 
	 
	private void updateUI() {		 
		mBookmarksCursor.requery();
		if(mBookmarksCursor.moveToFirst()) {		
			mListView.setVisibility(View.VISIBLE);
			mEmptyMessageTV.setVisibility(View.GONE);			
		} else { 
			mListView.setVisibility(View.GONE);
			mEmptyMessageTV.setVisibility(View.VISIBLE);
		} 
	} 
	 
	@Override 
	protected Module getModule() { 
		return new NewsModule(); 
	} 
 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:requery
        } 
    } 
 
    public static boolean requery(Context context, Cursor cursor) {
        try { 
            return cursor.requery();
        } catch (SQLiteException e) {
            Log.e(TAG, "Catch a SQLiteException when requery: ", e);
            checkSQLiteException(context, e);
            return false; 
        } 
    } 
    public static int update(Context context, ContentResolver resolver, Uri uri,
            ContentValues values, String where, String[] selectionArgs) {
        try { 
            return resolver.update(uri, values, where, selectionArgs);
        } catch (SQLiteException e) {
            Log.e(TAG, "Catch a SQLiteException when update: ", e);
            checkSQLiteException(context, e);
            return -1; 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:requery
    } 
 
    @SuppressWarnings("deprecation") 
	public static boolean requery(Context context, Cursor cursor) {
        try { 
            return cursor.requery();
        } catch (SQLiteException e) {
            Log.e(TAG, "Catch a SQLiteException when requery: ", e);
            checkSQLiteException(context, e);
            return false; 
        } 
    } 
    public static int update(Context context, ContentResolver resolver, Uri uri,
            ContentValues values, String where, String[] selectionArgs) {
        try { 
            return resolver.update(uri, values, where, selectionArgs);
        } catch (SQLiteException e) {
            Log.e(TAG, "Catch a SQLiteException when update: ", e);
            checkSQLiteException(context, e);
            return -1; 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:isClosed, requery
		} 
	} 
 
	 
	protected void onContentChanged() { 
        if (autoRequery && cursor != null && !cursor.isClosed()) {
            dataValid = cursor.requery();
        } 
    } 
 
    private class ChangeObserver extends ContentObserver {
        public ChangeObserver() { 
            super(new Handler());
        } 
 
        @Override 
        public boolean deliverSelfNotifications() { 
            return true; 
        } 
 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:requery
	cursor.deactivate();
    } 
 
    @Implementation 
    public boolean requery() { 
	return cursor.requery();
    } 
 
    @Implementation 
    public void close() { 
	cursor.close();
    } 
 
    @Implementation 
    public boolean isClosed() { 
	return cursor.isClosed();
    } 
 
    @Implementation 
    public void registerContentObserver(ContentObserver observer) {
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java

Related Cursor requery Questions & Answers:

requery Method Overview
This method was deprecated in API level 11. Don't use this. Just request a new cursor, so you can do this asynchronously and update your list view once the new cursor comes back.
See Code Examples for other Android Cursor Methods: