OSDN Git Service

UX fixes for the language draggable cell
[android-x86/packages-apps-Settings.git] / res / layout / locale_drag_cell.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- Copyright (C) 2016 The Android Open Source Project
3
4      Licensed under the Apache License, Version 2.0 (the "License");
5      you may not use this file except in compliance with the License.
6      You may obtain a copy of the License at
7
8           http://www.apache.org/licenses/LICENSE-2.0
9
10      Unless required by applicable law or agreed to in writing, software
11      distributed under the License is distributed on an "AS IS" BASIS,
12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13      See the License for the specific language governing permissions and
14      limitations under the License.
15 -->
16
17 <com.android.settings.localepicker.LocaleDragCell
18               xmlns:android="http://schemas.android.com/apk/res/android"
19               xmlns:tools="http://schemas.android.com/tools"
20               android:layout_width="match_parent"
21               android:layout_height="wrap_content"
22               android:minHeight="?android:listPreferredItemHeight"
23               android:background="?android:colorBackground"
24               android:layoutDirection="locale"
25               android:textDirection="locale">
26
27     <CheckBox
28         android:id="@+id/checkbox"
29         style="@style/LanguageCheckboxAndLabel"
30         tools:text="French"
31         android:paddingStart="16dp"
32         android:layout_toStartOf="@+id/dragHandle"/>
33
34     <TextView
35         android:id="@+id/label"
36         style="@style/LanguageCheckboxAndLabel"
37         tools:text="French"
38         android:paddingStart="48dp"
39         android:layout_toStartOf="@+id/dragHandle"/>
40
41     <TextView
42         android:id="@+id/miniLabel"
43         android:layout_width="wrap_content"
44         android:layout_height="match_parent"
45         android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
46         tools:text="22"
47         android:textColor="?android:attr/colorAccent"
48         android:minWidth="32sp"
49         android:gravity="center_vertical|center_horizontal"
50         android:layout_alignTop="@id/checkbox"
51         android:layout_alignBottom="@id/checkbox"/>
52
53     <TextView
54         android:id="@+id/l10nWarn"
55         style="@style/LanguageCheckboxAndLabel"
56         android:layout_marginTop="-28dp"
57         android:paddingStart="48dp"
58         android:textAppearance="?android:attr/textAppearanceListItemSecondary"
59         android:textColor="?android:textColorSecondary"
60         android:text="@string/locale_not_translated"
61         android:layout_toStartOf="@+id/dragHandle"
62         android:layout_below="@id/label"/>
63
64     <ImageView
65         android:id="@+id/dragHandle"
66         android:layout_width="wrap_content"
67         android:layout_height="match_parent"
68         android:paddingStart="?android:attr/listPreferredItemPaddingStart"
69         android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
70         android:layout_gravity="center_vertical"
71         android:src="@drawable/drag_handle"
72         android:layout_alignParentEnd="true"
73         android:layout_alignTop="@id/checkbox"
74         android:layout_alignBottom="@id/checkbox"/>
75
76     <View
77         android:layout_width="match_parent"
78         android:layout_height="1dp"
79         android:background="?android:attr/listDivider"
80         android:layout_alignParentBottom="true"/>
81
82 </com.android.settings.localepicker.LocaleDragCell>