summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2016-11-02 09:00:57 (GMT)
committerDanny Baumann <dannybaumann@web.de>2016-11-02 09:00:57 (GMT)
commit832a6b06aad4ecd3f2c0817c071958ce64b1d04f (patch)
tree3a7369db594f7fc6def7671c51197ec7e050642d
parent85e8e6d1ccc5435fac4b224ffecc623ce6b7c833 (diff)
downloadandroid_packages_apps_Snap-832a6b06aad4ecd3f2c0817c071958ce64b1d04f.zip
android_packages_apps_Snap-832a6b06aad4ecd3f2c0817c071958ce64b1d04f.tar.gz
android_packages_apps_Snap-832a6b06aad4ecd3f2c0817c071958ce64b1d04f.tar.bz2
Fix off-by-one error in sub menu selection highlight.
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 =