From 8f0280cc3c14f9f04015dcc77bec4379a657aa41 Mon Sep 17 00:00:00 2001 From: kaiyiz Date: Mon, 20 Oct 2014 11:43:17 +0800 Subject: Gallery2: Fix the border name display abnormally The border name display abnormally Make the border name display normally Change-Id: Id237236830a272abd958e033315b0e70eff6ff38 CRs-fixed: 740974 --- res/values/filtershow_strings.xml | 2 +- .../android/gallery3d/filtershow/FilterShowActivity.java | 15 +++------------ 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 @@ Original - Borders + Frame Custom 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 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)); } } -- cgit v1.2.3