Files
app_Settings/res/layout/locale_drag_cell.xml
tom hsu 99037a8bf8 Imporve UI of system langauge list
Bug: b/274721595
Test: Manual test
Change-Id: I951de80de4ac40df48829d3f23c0f1c8d98e0137
2023-03-23 00:34:49 +08:00

95 lines
3.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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="12dp"
android:layout_marginBottom="12dp"
android:layoutDirection="locale"
android:textDirection="locale">
<CheckBox
android:id="@+id/checkbox"
style="@style/LanguageCheckboxAndLabel"
android:paddingStart="24dp"
android:layout_toStartOf="@+id/dragHandle"
android:layout_alignTop="@+id/miniLabel"
android:layout_alignBottom="@+id/miniLabel" />
<TextView
android:id="@+id/miniLabel"
style="@style/LanguageCheckboxAndLabel"
android:layout_width="wrap_content"
android:textColor="?android:attr/colorAccent"
android:minWidth="24sp"
android:gravity="center_vertical|center_horizontal"
android:layout_centerVertical="true"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
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" />
<TextView
android:id="@+id/l10nWarn"
style="@style/LanguageCheckboxAndLabel"
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
android:textColor="?android:textColorSecondary"
android:layout_marginTop="4dp"
android:text="@string/locale_not_translated"/>
<TextView
android:id="@+id/default_locale"
style="@style/LanguageCheckboxAndLabel"
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
android:textColor="?android:textColorSecondary"
android:layout_marginTop="4dp"
android:text="@string/desc_current_default_language"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="@+id/dragHandle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:layout_gravity="center_vertical"
android:src="@drawable/drag_handle"
android:importantForAccessibility="no"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"/>
</com.android.settings.localepicker.LocaleDragCell>