Merge "Check if item is selectable before calling on click" into nyc-dev am: 5ae74b7fa6
am: 82036dbe65
* commit '82036dbe6569c807500836d624e1187ed0bb2449':
Check if item is selectable before calling on click
This commit is contained in:
@@ -3078,7 +3078,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
|
||||
final int motionPosition = mClickMotionPosition;
|
||||
if (adapter != null && mItemCount > 0 &&
|
||||
motionPosition != INVALID_POSITION &&
|
||||
motionPosition < adapter.getCount() && sameWindow()) {
|
||||
motionPosition < adapter.getCount() && sameWindow() &&
|
||||
adapter.isEnabled(motionPosition)) {
|
||||
final View view = getChildAt(motionPosition - mFirstPosition);
|
||||
// If there is no view, something bad happened (the view scrolled off the
|
||||
// screen, etc.) and we should cancel the click
|
||||
|
||||
Reference in New Issue
Block a user