Bug #
2520743
Bad GridView, bad!
Change-Id: Ideed32dc70a69c85df5afbf949e78b481e147b7f
default:
if (childCount == 0) {
if (!mStackFromBottom) {
- setSelectedPositionInt(0);
+ setSelectedPositionInt(mAdapter == null || isInTouchMode() ?
+ INVALID_POSITION : 0);
sel = fillFromTop(childrenTop);
} else {
final int last = mItemCount - 1;
- setSelectedPositionInt(last);
+ setSelectedPositionInt(mAdapter == null || isInTouchMode() ?
+ INVALID_POSITION : last);
sel = fillFromBottom(last, childrenBottom);
}
} else {