Merge "Don't supply a null child to the click listener. External bug #http://code.google.com/p/android/issues/detail?id=7644"

This commit is contained in:
Romain Guy
2010-04-09 14:09:42 -07:00
committed by Android (Google) Code Review

View File

@@ -913,10 +913,10 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
if (mItemClickListener != null) {
final DropDownListView list = mDropDownList;
// Note that we don't have a View here, so we will need to
// supply null. Hopefully no existing apps crash...
mItemClickListener.onItemClick(list, null, completion.getPosition(),
completion.getId());
final int position = completion.getPosition();
mItemClickListener.onItemClick(list,
list.getChildAt(position - list.getFirstVisiblePosition()),
position, completion.getId());
}
}
}