1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2018 The Android Open Source Project 4 5 Licensed under the Apache License, Version 2.0 (the "License"); 6 you may not use this file except in compliance with the License. 7 You may obtain a copy of the License at 8 9 http://www.apache.org/licenses/LICENSE-2.0 10 11 Unless required by applicable law or agreed to in writing, software 12 distributed under the License is distributed on an "AS IS" BASIS, 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 See the License for the specific language governing permissions and 15 limitations under the License. 16--> 17<!-- similar to preference_material.xml but textview for emoji country flag 18instead of an ImageView --> 19 20<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 21 android:layout_width="match_parent" 22 android:layout_height="wrap_content" 23 android:orientation="horizontal" 24 android:minHeight="?android:attr/listPreferredItemHeightSmall" 25 android:gravity="center_vertical" 26 android:paddingLeft="?android:attr/listPreferredItemPaddingLeft" 27 android:paddingRight="?android:attr/listPreferredItemPaddingRight" 28 android:background="?android:attr/selectableItemBackground" 29 android:clipToPadding="false"> 30 31 <LinearLayout 32 android:id="@+id/icon_frame" 33 android:layout_width="wrap_content" 34 android:layout_height="wrap_content" 35 android:layout_marginLeft="-4dp" 36 android:minWidth="60dp" 37 android:gravity="start|center_vertical" 38 android:orientation="horizontal" 39 android:paddingRight="12dp" 40 android:paddingTop="4dp" 41 android:paddingBottom="4dp"> 42 <!-- It's not ImageView because the icon is Unicode emoji. --> 43 <TextView 44 android:id="@+id/icon_text" 45 android:layout_width="wrap_content" 46 android:layout_height="wrap_content" 47 android:singleLine="true" 48 android:contentDescription="" 49 android:textAppearance="?android:attr/textAppearanceLarge" 50 android:textColor="?android:attr/textColorPrimary" 51 android:importantForAccessibility="no"/> 52 </LinearLayout> 53 54 <LinearLayout 55 android:layout_width="wrap_content" 56 android:layout_height="wrap_content" 57 android:layout_weight="1" 58 android:orientation="vertical" 59 android:paddingTop="16dp" 60 android:paddingBottom="16dp"> 61 62 <TextView android:id="@android:id/title" 63 android:layout_width="match_parent" 64 android:layout_height="wrap_content" 65 android:singleLine="true" 66 android:textAppearance="?android:attr/textAppearanceListItem" 67 android:ellipsize="marquee" /> 68 69 <RelativeLayout 70 android:id="@+id/summary_frame" 71 android:layout_width="match_parent" 72 android:layout_height="wrap_content" 73 android:layout_below="@android:id/title" 74 android:layout_alignLeft="@android:id/title"> 75 76 <TextView 77 android:id="@+id/current_time" 78 android:layout_width="wrap_content" 79 android:layout_height="wrap_content" 80 android:textAppearance="?android:attr/textAppearanceSmall" 81 android:textColor="?android:attr/textColorSecondary" 82 android:layout_alignParentEnd="true"/> 83 84 <!-- Use layout_alignParentStart and layout_toStartOf to make the TextView multi-lines 85 if needed --> 86 <TextView 87 android:id="@android:id/summary" 88 android:layout_width="wrap_content" 89 android:layout_height="wrap_content" 90 android:textAppearance="?android:attr/textAppearanceSmall" 91 android:textColor="?android:attr/textColorSecondary" 92 android:maxLines="10" 93 android:layout_alignParentStart="true" 94 android:layout_toStartOf="@+id/current_time"/> 95 96 </RelativeLayout> 97 98 </LinearLayout> 99</LinearLayout>