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

Commit b0286374 authored by Zoey Chen's avatar Zoey Chen Committed by Android (Google) Code Review
Browse files

Merge "[Regional Preference] Add the contentDescription to the checked image" into main

parents 6ab83fa7 c2be76de
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -287,7 +287,6 @@ public class SuggestedLocaleAdapter extends BaseAdapter implements Filterable {
                        updatedView = mInflater.inflate(
                                R.layout.app_language_picker_current_locale_item,
                                parent, false);
                        addStateDescriptionIntoCurrentLocaleItem(updatedView);
                    }
                } else {
                    shouldReuseView = convertView instanceof TextView
@@ -304,7 +303,6 @@ public class SuggestedLocaleAdapter extends BaseAdapter implements Filterable {
                if (!shouldReuseView) {
                    updatedView = mInflater.inflate(
                            R.layout.app_language_picker_current_locale_item, parent, false);
                    addStateDescriptionIntoCurrentLocaleItem(updatedView);
                }
                break;
            default:
@@ -441,9 +439,4 @@ public class SuggestedLocaleAdapter extends BaseAdapter implements Filterable {
                    : View.TEXT_DIRECTION_LTR);
        }
    }

    private void addStateDescriptionIntoCurrentLocaleItem(View root) {
        String description = root.getContext().getResources().getString(R.string.checked);
        root.setStateDescription(description);
    }
}
+2 −1
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:src="@drawable/ic_check_24dp"
            app:tint="?attr/colorAccentPrimaryVariant"/>
            app:tint="?attr/colorAccentPrimaryVariant"
            android:contentDescription="@*android:string/checked"/>
    </LinearLayout>
</LinearLayout>