diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/widget/Gallery.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/widget/Gallery.java b/core/java/android/widget/Gallery.java index f34823c..6775a94 100644 --- a/core/java/android/widget/Gallery.java +++ b/core/java/android/widget/Gallery.java @@ -1207,7 +1207,7 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList // We unfocus the old child down here so the above hasFocus check // returns true - if (oldSelectedChild != null) { + if (oldSelectedChild != null && oldSelectedChild != child) { // Make sure its drawable state doesn't contain 'selected' oldSelectedChild.setSelected(false); @@ -1263,6 +1263,7 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList */ if (gainFocus && mSelectedChild != null) { mSelectedChild.requestFocus(direction); + mSelectedChild.setSelected(true); } } |