@Override public boolean isEnabled(int position) { //noinspection SimplifiableConditionalExpression return isSectionHeaderPosition(position) ? false : mBaseAdapter.isEnabled(sectionedPositionToPosition(position)); }
public boolean isEnabled(int i) { ListAdapter listadapter = b; if (listadapter != null) { return listadapter.isEnabled(i); } else { return true; } }
/** * Returns true if the item at the specified position is not a separator. * * @param position Position of the item whose data we want */ @Override public boolean isEnabled(int position) { for (ListAdapter piece : pieces) { int size = piece.getCount(); if (position < size) { return (piece.isEnabled(position)); } position -= size; } return (false); }
public boolean isEnabled(int position) { // Header (negative positions will throw an ArrayIndexOutOfBoundsException) int numHeaders = getHeadersCount(); if (position < numHeaders) { return mHeaderViewInfos.get(position).isSelectable; } // Adapter final int adjPosition = position - numHeaders; int adapterCount = 0; if (mAdapter != null) { adapterCount = mAdapter.getCount(); if (adjPosition < adapterCount) { return mAdapter.isEnabled(adjPosition); } } // Footer (off-limits positions will throw an ArrayIndexOutOfBoundsException) return mFooterViewInfos.get(adjPosition - adapterCount).isSelectable; }
@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; } // Adapter final int adjPosition = position - numHeadersAndPlaceholders; int adapterCount = 0; if (mAdapter != null) { adapterCount = mAdapter.getCount(); if (adjPosition < adapterCount) { return mAdapter.isEnabled(adjPosition); } } throw new ArrayIndexOutOfBoundsException(position); }
@Override public boolean isEnabled(int position) { // Header (negative positions will throw an IndexOutOfBoundsException) int numHeadersAndPlaceholders = getHeadersCount() * mNumColumns; if (position < numHeadersAndPlaceholders) { return position % mNumColumns == 0 && mHeaderViewInfos.get(position / mNumColumns).isSelectable; } // Adapter final int adjPosition = position - numHeadersAndPlaceholders; int adapterCount = 0; if (mAdapter != null) { adapterCount = getAdapterAndPlaceHolderCount(); if (adjPosition < adapterCount) { return adjPosition < mAdapter.getCount() && mAdapter.isEnabled(adjPosition); } } // Footer (off-limits positions will throw an IndexOutOfBoundsException) final int footerPosition = adjPosition - adapterCount; return footerPosition % mNumColumns == 0 && mFooterViewInfos.get(footerPosition / mNumColumns).isSelectable; }
@Override public boolean isEnabled(final int position) { return wrapped.isEnabled(position); }
@Override public boolean isEnabled(final int position) { return isSectionHeaderPosition(position) ? false : mBaseAdapter.isEnabled(sectionedPositionToPosition(position)); }
@Override public boolean isEnabled(int position) { return mAdapter.isEnabled(position); }