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

Commit e2eb8222 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Imporve UI of system langauge list" into udc-dev

parents caea0d9a 99037a8b
Loading
Loading
Loading
Loading
+44 −41
Original line number Diff line number Diff line
@@ -16,12 +16,13 @@

<com.android.settings.localepicker.LocaleDragCell
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:listPreferredItemHeight"
    android:background="?android:colorBackground"
              android:layout_marginTop="4dp"
              android:layout_marginBottom="4dp"
    android:layout_marginTop="12dp"
    android:layout_marginBottom="12dp"
    android:layoutDirection="locale"
    android:textDirection="locale">

@@ -29,7 +30,9 @@
        android:id="@+id/checkbox"
        style="@style/LanguageCheckboxAndLabel"
        android:paddingStart="24dp"
        android:layout_toStartOf="@+id/dragHandle"/>
        android:layout_toStartOf="@+id/dragHandle"
        android:layout_alignTop="@+id/miniLabel"
        android:layout_alignBottom="@+id/miniLabel" />

    <TextView
        android:id="@+id/miniLabel"
@@ -38,16 +41,22 @@
        android:textColor="?android:attr/colorAccent"
        android:minWidth="24sp"
        android:gravity="center_vertical|center_horizontal"
        android:layout_alignTop="@id/checkbox"
        android:layout_alignBottom="@id/checkbox"/>
        android:layout_centerVertical="true"/>

    <LinearLayout
    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:minHeight="?android:listPreferredItemHeight"
        android:paddingStart="56dp"
        android:layout_toStartOf="@+id/dragHandle">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toBottomOf="parent">
            <TextView
                android:id="@+id/label"
                style="@style/LanguageCheckboxAndLabel" />
@@ -57,7 +66,7 @@
                style="@style/LanguageCheckboxAndLabel"
                android:textAppearance="?android:attr/textAppearanceListItemSecondary"
                android:textColor="?android:textColorSecondary"
            android:layout_marginBottom="4dp"
                android:layout_marginTop="4dp"
                android:text="@string/locale_not_translated"/>

            <TextView
@@ -65,10 +74,11 @@
                style="@style/LanguageCheckboxAndLabel"
                android:textAppearance="?android:attr/textAppearanceListItemSecondary"
                android:textColor="?android:textColorSecondary"
            android:layout_marginBottom="4dp"
                android:layout_marginTop="4dp"
                android:text="@string/desc_current_default_language"/>

        </LinearLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>

    <ImageView
        android:id="@+id/dragHandle"
@@ -80,13 +90,6 @@
        android:src="@drawable/drag_handle"
        android:importantForAccessibility="no"
        android:layout_alignParentEnd="true"
        android:layout_alignTop="@id/checkbox"
        android:layout_alignBottom="@id/checkbox"/>

    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="?android:attr/listDivider"
        android:layout_alignParentBottom="true"/>
        android:layout_centerVertical="true"/>

</com.android.settings.localepicker.LocaleDragCell>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -370,7 +370,7 @@
    <string name="desc_notice_of_language_picker">To select a language for each app, go to app language settings.</string>
    <!-- Title for locale helper page [CHAR LIMIT=NONE] -->
    <string name="desc_locale_helper_footer_general">Learn more about languages</string>
    <string name="desc_locale_helper_footer_general">Learn more about app languages</string>
    <!-- Link for Locale helper page. [CHAR LIMIT=NONE]-->
    <string name="link_locale_picker_footer_learn_more" translatable="false">https://support.google.com/android?p=per_language_app_settings</string>
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ class LocaleDragAndDropAdapter

        dragCell.setLabelAndDescription(label, description);
        dragCell.setLocalized(feedItem.isTranslated());
        dragCell.setCurrentDefault(feedItem.getLocale().equals(Locale.getDefault()));
        dragCell.setCurrentDefault(feedItem.getLocale().equals(LocalePicker.getLocales().get(0)));
        dragCell.setMiniLabel(mNumberFormatter.format(i + 1));
        dragCell.setShowCheckbox(mRemoveMode);
        dragCell.setShowMiniLabel(!mRemoveMode);