summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-07-10 18:57:08 -0700
committernicolasroard <nicolasroard@google.com>2013-07-10 18:57:08 -0700
commit9bba45787308782a8e4c2edae4b754f9537605d0 (patch)
tree183370f561fedea724644a2ce51bbe00db9d5c59 /src
parent3fa5bfbdbb0c38c342fcf1a31d1285f4345710ce (diff)
downloadandroid_packages_apps_Snap-9bba45787308782a8e4c2edae4b754f9537605d0.zip
android_packages_apps_Snap-9bba45787308782a8e4c2edae4b754f9537605d0.tar.gz
android_packages_apps_Snap-9bba45787308782a8e4c2edae4b754f9537605d0.tar.bz2
Fix selection in categories
Change-Id: Ica9ff5ba4a6d195f8b1ea1a686e9bbc6772d655f
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/filtershow/category/CategoryAdapter.java2
-rw-r--r--src/com/android/gallery3d/filtershow/category/CategoryPanel.java2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/filtershow/category/CategoryAdapter.java b/src/com/android/gallery3d/filtershow/category/CategoryAdapter.java
index 384f57a..445ef5f 100644
--- a/src/com/android/gallery3d/filtershow/category/CategoryAdapter.java
+++ b/src/com/android/gallery3d/filtershow/category/CategoryAdapter.java
@@ -167,6 +167,7 @@ public class CategoryAdapter extends ArrayAdapter<Action> {
if (rep.getName().equalsIgnoreCase(
getItem(i).getRepresentation().getName())) {
selected = i;
+ break;
}
}
}
@@ -174,6 +175,5 @@ public class CategoryAdapter extends ArrayAdapter<Action> {
mSelectedPosition = selected;
this.notifyDataSetChanged();
}
-
}
}
diff --git a/src/com/android/gallery3d/filtershow/category/CategoryPanel.java b/src/com/android/gallery3d/filtershow/category/CategoryPanel.java
index 477e00f..de2481f 100644
--- a/src/com/android/gallery3d/filtershow/category/CategoryPanel.java
+++ b/src/com/android/gallery3d/filtershow/category/CategoryPanel.java
@@ -51,11 +51,13 @@ public class CategoryPanel extends Fragment {
case MainPanel.LOOKS: {
mAdapter = activity.getCategoryLooksAdapter();
mAdapter.initializeSelection(MainPanel.LOOKS);
+ activity.updateCategories();
break;
}
case MainPanel.BORDERS: {
mAdapter = activity.getCategoryBordersAdapter();
mAdapter.initializeSelection(MainPanel.BORDERS);
+ activity.updateCategories();
break;
}
case MainPanel.GEOMETRY: {