Code example for ResourceCursorAdapter

Methods: getCursor, notifyDataSetInvalidated

0
    } 
 
    @Override 
    public void notifyDataSetInvalidated() { 
        if (DBG) Log.d(LOG_TAG, "notifyDataSetInvalidated");
        super.notifyDataSetInvalidated(); 
 
        updateSpinnerState(getCursor());
    } 
 
    private void updateSpinnerState(Cursor cursor) {
        Bundle extras = cursor != null ? cursor.getExtras() : null;
        if (DBG) {
            Log.d(LOG_TAG, "updateSpinnerState - extra = "
                    + (extras != null
                    ? extras.getBoolean(SearchManager.CURSOR_EXTRA_KEY_IN_PROGRESS)
                    : null)); 
        } 
        // Check if the Cursor indicates that the query is not complete and show the spinner 
        if (extras != null
                && extras.getBoolean(SearchManager.CURSOR_EXTRA_KEY_IN_PROGRESS)) {