ListAdapter areAllItemsEnabled - top ranked examples from Open Source projects

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

This code example shows how to use the following methods:areAllItemsEnabled
  public void unregisterDataSetObserver(DataSetObserver observer) {
    delegate.unregisterDataSetObserver(observer);
  } 
   
  public boolean areAllItemsEnabled() { 
    return(delegate.areAllItemsEnabled());
  } 
   
  public boolean isEnabled(int position) {
    return(delegate.isEnabled(position));
  } 
} 
7
CodeRank
This code example shows how to use the following methods:areAllItemsEnabled
		return wrapped;
	} 
 
	@Override 
	public boolean areAllItemsEnabled() { 
		return wrapped.areAllItemsEnabled();
	} 
 
	@Override 
	public boolean isEnabled(int i) {
		return wrapped.isEnabled(i);
	} 
 
	@Override 
	public void registerDataSetObserver(DataSetObserver dataSetObserver) {
		wrapped.registerDataSetObserver(dataSetObserver);
	} 
 
	@Override 
	public void unregisterDataSetObserver(DataSetObserver dataSetObserver) {
6
CodeRank
This code example shows how to use the following methods:areAllItemsEnabled
            wrapped.unregisterDataSetObserver(dataSetObserver);
        } 
 
        @Override 
        public boolean areAllItemsEnabled() { 
            return wrapped.areAllItemsEnabled();
        } 
 
        @Override 
        public boolean isEnabled(int position) {
            return wrapped.isEnabled(position);
        } 
    } 
 
    public boolean performItemLongClick(final View child,
            final int longPressPosition, final long longPressId) {
        if (mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL) {
            if (mChoiceActionMode == null &&
                    (mChoiceActionMode = startActionMode(mMultiChoiceModeCallback)) != null) {
                setItemChecked(longPressPosition, true);
3
CodeRank
This code example shows how to use the following methods:areAllItemsEnabled
        } 
 
        @Override 
        public boolean areAllItemsEnabled() { 
            if (mAdapter != null) {
                return mAreAllFixedViewsSelectable && mAdapter.areAllItemsEnabled();
            } else { 
                return true; 
            } 
        } 
 
        @Override 
        public boolean isEnabled(int position) {
            // Header (negative positions will throw an ArrayIndexOutOfBoundsException) 
            int numHeadersAndPlaceholders = getHeadersCount() * mNumColumns;
            if (position < numHeadersAndPlaceholders) {
                return (position % mNumColumns == 0)
                        && mHeaderViewInfos.get(position / mNumColumns).isSelectable;
            } 
 
3
CodeRank
This code example shows how to use the following methods:areAllItemsEnabled
    } 
 
    @Override 
    public boolean areAllItemsEnabled() { 
        if (mAdapter != null) {
            return mAreAllFixedViewsSelectable && mAdapter.areAllItemsEnabled();
        } else { 
            return true; 
        } 
    } 
 
    @Override 
    public boolean isEnabled(int position) {
        if (position < headerSize) {
            return true; 
        } 
 
        int adjPosition = position - headerSize;
        if (mAdapter != null) {
            if (adjPosition < mAdapter.getCount()) {
4
CodeRank
This code example shows how to use the following methods:areAllItemsEnabled
 
		@Override 
		public boolean areAllItemsEnabled() { 
			final ListAdapter adapter = mListAdapter;
			if (adapter != null) {
				return adapter.areAllItemsEnabled();
			} else { 
				return true; 
			} 
		} 
 
		@Override 
		public int getCount() { 
			return mAdapter == null ? 0 : mAdapter.getCount();
		} 
 
		@Override 
		public View getDropDownView(int position, View convertView,
				ViewGroup parent) {
			return mAdapter == null ? null : mAdapter.getDropDownView(position,
3
CodeRank
This code example shows how to use the following methods:areAllItemsEnabled
            return wrappedAdapter.getItemViewType(position);
    } 
 
    @Override 
    public boolean areAllItemsEnabled() { 
        return wrappedAdapter.areAllItemsEnabled();
    } 
 
    @Override 
    public boolean isEnabled(int position) {
        if (isLoadingPosition(position)) return false;
        return wrappedAdapter.isEnabled(position);
    } 
 
    @Override 
    public View getView(int position, View convertView, ViewGroup parent) {
        if (isLoadingPosition(position)) {
            if (pendingView == null) {
                pendingView = getPendingView(parent);
            } 
4
CodeRank
This code example shows how to use the following methods:areAllItemsEnabled
     * Otherwise, return true.  
     */ 
    public boolean areAllItemsEnabled() { 
        final ListAdapter adapter = mListAdapter;
        if (adapter != null) {
            return adapter.areAllItemsEnabled();
        } else { 
            return true; 
        } 
    } 
 
    /** 
     * If the wrapped SpinnerAdapter is also a ListAdapter, delegate this call. 
     * Otherwise, return true. 
     */ 
    public boolean isEnabled(int position) {
        final ListAdapter adapter = mListAdapter;
        if (adapter != null) {
            return adapter.isEnabled(position);
        } else { 
4
CodeRank
This code example shows how to use the following methods:areAllItemsEnabled
 
    @Override 
    public void setAdapter(ListAdapter adapter) {
        super.setAdapter(adapter);
        if (adapter != null) {
            mAreAllItemsSelectable = adapter.areAllItemsEnabled();
        } else { 
            mAreAllItemsSelectable = true;
        } 
    } 
 
    int lookForSelectablePositionCompat(int position, boolean lookDown) {
        final ListAdapter adapter = getAdapter();
        if (adapter == null || isInTouchMode()) {
            return INVALID_POSITION;
        } 
 
        final int count = adapter.getCount();
        if (!mAreAllItemsSelectable) {
            if (lookDown) {
5
CodeRank
This code example shows how to use the following methods:areAllItemsEnabled
        return vpsViewCount;
    } 
 
    @Override 
    public boolean areAllItemsEnabled() { 
        return delegate.areAllItemsEnabled();
    } 
 
    @Override 
    public int getCount() { 
        return delegate.getCount();
    } 
 
    @Override 
    public Object getItem(int i) {
        return delegate.getItem(i);
    } 
 
    @Override 
    public long getItemId(int i) {
4
CodeRank

Related ListAdapter areAllItemsEnabled Questions & Answers:

areAllItemsEnabled Method Overview
Indicates whether all the items in this adapter are enabled.
See Code Examples for other Android ListAdapter Methods: