summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2016-11-02 10:00:57 +0100
committerAdrian DC <radian.dc@gmail.com>2016-12-03 22:12:08 +0100
commit5db8da4ce6c909f35bc5672210c6ef51b63ffc6c (patch)
treef226119383f7a467eec41a31548a3864df6e23a9
parent3502c3c1047ce35960bed99c6d487602d4c05067 (diff)
downloadandroid_packages_apps_Snap-5db8da4ce6c909f35bc5672210c6ef51b63ffc6c.zip
android_packages_apps_Snap-5db8da4ce6c909f35bc5672210c6ef51b63ffc6c.tar.gz
android_packages_apps_Snap-5db8da4ce6c909f35bc5672210c6ef51b63ffc6c.tar.bz2
Fix off-by-one error in sub menu selection highlight.
RM-290 Change-Id: I975495526671a4aa5311a471026831e0096a873c
-rw-r--r--src/com/android/camera/ui/ListSubMenu.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/camera/ui/ListSubMenu.java b/src/com/android/camera/ui/ListSubMenu.java
index 1965cec..44adad7 100644
--- a/src/com/android/camera/ui/ListSubMenu.java
+++ b/src/com/android/camera/ui/ListSubMenu.java
@@ -124,7 +124,7 @@ public class ListSubMenu extends ListView implements
public void reloadPreference() {
int index = mPreference.findIndexOfValue(mPreference.getValue());
if (index != -1) {
- setItemChecked(index, true);
+ setItemChecked(index + getHeaderViewsCount(), true);
} else {
Log.e(TAG, "Invalid preference value.");
mPreference.print();
@@ -161,6 +161,7 @@ public class ListSubMenu extends ListView implements
mFooter = new Space(getContext());
addFooterView(mFooter);
setFooterDividersEnabled(false);
+ reloadPreference();
}
boolean largerThanRoot =