Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f0280cc authored by kaiyiz's avatar kaiyiz Committed by cretin45
Browse files

Gallery2: Fix the border name display abnormally

The border name display abnormally

Make the border name display normally

Change-Id: Id237236830a272abd958e033315b0e70eff6ff38
CRs-fixed: 740974
parent 518e8907
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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>

+3 −12
Original line number Diff line number Diff line
@@ -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));
        }
    }