summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ui/MoreSettingPopup.java
diff options
context:
space:
mode:
authorAshok Raj Deenadayalan <adeena@codeaurora.org>2013-10-21 20:48:40 +0530
committerLinux Build Service Account <lnxbuild@localhost>2013-10-31 19:40:27 -0600
commitc5b0bfcf2340f02ca65ad3d8c08b5c7d74776ea1 (patch)
tree266a7dd20830d53adb7a94d44ffa869e2831b5ec /src/com/android/camera/ui/MoreSettingPopup.java
parentee63d7f82f490fbb7a1d9151f2a5006ce42a58f4 (diff)
downloadandroid_packages_apps_Snap-c5b0bfcf2340f02ca65ad3d8c08b5c7d74776ea1.tar.gz
android_packages_apps_Snap-c5b0bfcf2340f02ca65ad3d8c08b5c7d74776ea1.tar.bz2
android_packages_apps_Snap-c5b0bfcf2340f02ca65ad3d8c08b5c7d74776ea1.zip
CameraApp: Updating the view for new list item preference
User has launched the popup menu view in portait mode and can see all the list items in a single view. When user turns the device to landscape mode, the popup view will be shown partially, thus user has to scroll the popup menu to see remaining list items. When user scroll's over the view, if the view is not updated/ initialized with the new list item, it will render the old indexed item(s), thus user will see the repeatation of old items. This fix will update the view by initializing the item preference from the adapter and returns the updated view based on new position. CRs-fixed: 524897 (cherrypicked from: I9ae25f0a711bc641fa405e85292db2c1af95e8a1) Change-Id: I7cc63c9e01a69b6c439102a93f964013f1e15374 (cherry picked from commit d69c568eb8bf9a9a5cce6c9402617f9e6f3072a8) (cherry picked from commit 3851a9b18310580ef9f6ccecdfb1c3ca08a6c719)
Diffstat (limited to 'src/com/android/camera/ui/MoreSettingPopup.java')
-rw-r--r--src/com/android/camera/ui/MoreSettingPopup.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/com/android/camera/ui/MoreSettingPopup.java b/src/com/android/camera/ui/MoreSettingPopup.java
index 8da26c946..30c021ca3 100644
--- a/src/com/android/camera/ui/MoreSettingPopup.java
+++ b/src/com/android/camera/ui/MoreSettingPopup.java
@@ -82,13 +82,14 @@ public class MoreSettingPopup extends AbstractSettingPopup
@Override
public View getView(int position, View convertView, ViewGroup parent) {
- if (convertView != null) return convertView;
-
ListPreference pref = mListItem.get(position);
-
int viewLayoutId = getSettingLayoutId(pref);
- InLineSettingItem view = (InLineSettingItem)
- mInflater.inflate(viewLayoutId, parent, false);
+ InLineSettingItem view = (InLineSettingItem)convertView;
+
+ if (view == null) {
+ view = (InLineSettingItem)
+ mInflater.inflate(viewLayoutId, parent, false);
+ }
view.initialize(pref); // no init for restore one
view.setSettingChangedListener(MoreSettingPopup.this);