summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2014-10-20 11:43:17 +0800
committercretin45 <cretin45@gmail.com>2014-12-15 14:49:02 -0800
commit8f0280cc3c14f9f04015dcc77bec4379a657aa41 (patch)
treefac481097f4bab017450da5333382e2a2950bfd8
parent518e890792416c58be868f1fd0c5c9aa2289fc0c (diff)
downloadandroid_packages_apps_Gallery2-8f0280cc3c14f9f04015dcc77bec4379a657aa41.tar.gz
android_packages_apps_Gallery2-8f0280cc3c14f9f04015dcc77bec4379a657aa41.tar.bz2
android_packages_apps_Gallery2-8f0280cc3c14f9f04015dcc77bec4379a657aa41.zip
Gallery2: Fix the border name display abnormally
The border name display abnormally Make the border name display normally Change-Id: Id237236830a272abd958e033315b0e70eff6ff38 CRs-fixed: 740974
-rw-r--r--res/values/filtershow_strings.xml2
-rw-r--r--src/com/android/gallery3d/filtershow/FilterShowActivity.java15
2 files changed, 4 insertions, 13 deletions
diff --git a/res/values/filtershow_strings.xml b/res/values/filtershow_strings.xml
index 98f32ebda..9a6b08f08 100644
--- a/res/values/filtershow_strings.xml
+++ b/res/values/filtershow_strings.xml
@@ -35,7 +35,7 @@
<!-- Text to label an image as "original" [CHAR LIMIT=20] -->
<string name="original">Original</string>
<!-- Text for filters that apply a border to a picture [CHAR LIMIT=20] -->
- <string name="borders" msgid="4461692156695893616">Borders</string>
+ <string name="borders" msgid="4461692156695893616">Frame</string>
<!-- Text for the custom border filter [CHAR LIMIT=20] -->
<string name="custom_border">Custom</string>
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index e627a612b..6e7901252 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -558,24 +558,15 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL
private void fillBorders() {
FiltersManager filtersManager = FiltersManager.getManager();
ArrayList<FilterRepresentation> borders = filtersManager.getBorders();
+ mCategoryBordersAdapter = new CategoryAdapter(this);
for (int i = 0; i < borders.size(); i++) {
FilterRepresentation filter = borders.get(i);
- filter.setName(getString(R.string.borders));
+ filter.setName(getString(R.string.borders) + "" + i);
if (i == 0) {
filter.setName(getString(R.string.none));
}
- }
-
- if (mCategoryBordersAdapter != null) {
- mCategoryBordersAdapter.clear();
- }
- mCategoryBordersAdapter = new CategoryAdapter(this);
- for (FilterRepresentation representation : borders) {
- if (representation.getTextId() != 0) {
- representation.setName(getString(representation.getTextId()));
- }
- mCategoryBordersAdapter.add(new Action(this, representation, Action.FULL_VIEW));
+ mCategoryBordersAdapter.add(new Action(this, filter, Action.FULL_VIEW));
}
}