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

Commit b1cdea67 authored by Mihai Niță's avatar Mihai Niță Committed by Android (Google) Code Review
Browse files

Merge "Settings: change the TTS text to use the current locale" into nyc-dev

parents afdcb6a7 d86cba77
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -152,8 +152,9 @@ class LocaleDragAndDropAdapter
    public void onBindViewHolder(final CustomViewHolder holder, int i) {
        final LocaleStore.LocaleInfo feedItem = mFeedItemList.get(i);
        final LocaleDragCell dragCell = holder.getLocaleDragCell();
        String label = feedItem.getFullNameNative();
        dragCell.setLabel(label);
        final String label = feedItem.getFullNameNative();
        final String description = feedItem.getFullNameInUiLanguage();
        dragCell.setLabelAndDescription(label, description);
        dragCell.setLocalized(feedItem.isTranslated());
        dragCell.setMiniLabel(mNumberFormatter.format(i + 1));
        dragCell.setShowCheckbox(mRemoveMode);
@@ -166,7 +167,7 @@ class LocaleDragAndDropAdapter
                    @Override
                    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                        LocaleStore.LocaleInfo feedItem =
                                (LocaleStore.LocaleInfo) holder.getLocaleDragCell().getTag();
                                (LocaleStore.LocaleInfo) dragCell.getTag();
                        feedItem.setChecked(isChecked);
                    }
                });
+3 −1
Original line number Diff line number Diff line
@@ -87,9 +87,11 @@ class LocaleDragCell extends RelativeLayout {
        invalidate();
    }

    public void setLabel(String labelText) {
    public void setLabelAndDescription(String labelText, String description) {
        mLabel.setText(labelText);
        mCheckbox.setText(labelText);
        mLabel.setContentDescription(description);
        mCheckbox.setContentDescription(description);
        invalidate();
    }