am f12c91f5: Merge "Remember focused child during layout when adapter has stable IDs" into mnc-dev
* commit 'f12c91f5e67171bae0d36e89a507c96ff81d04a2': Remember focused child during layout when adapter has stable IDs
This commit is contained in:
@@ -1621,7 +1621,8 @@ public class ListView extends AbsListView {
|
|||||||
// We can remember the focused view to restore after re-layout
|
// We can remember the focused view to restore after re-layout
|
||||||
// if the data hasn't changed, or if the focused position is a
|
// if the data hasn't changed, or if the focused position is a
|
||||||
// header or footer.
|
// header or footer.
|
||||||
if (!dataChanged || isDirectChildHeaderOrFooter(focusedChild)) {
|
if (!dataChanged || isDirectChildHeaderOrFooter(focusedChild)
|
||||||
|
|| focusedChild.hasTransientState() || mAdapterHasStableIds) {
|
||||||
focusLayoutRestoreDirectChild = focusedChild;
|
focusLayoutRestoreDirectChild = focusedChild;
|
||||||
// Remember the specific view that had focus.
|
// Remember the specific view that had focus.
|
||||||
focusLayoutRestoreView = findFocus();
|
focusLayoutRestoreView = findFocus();
|
||||||
|
|||||||
Reference in New Issue
Block a user