1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2017 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<merge xmlns:android="http://schemas.android.com/apk/res/android" 17 android:layout_width="wrap_content" 18 android:layout_height="wrap_content"> 19 20 <LinearLayout 21 android:layout_width="match_parent" 22 android:layout_height="wrap_content" 23 android:paddingTop="@dimen/widget_preview_label_vertical_padding" 24 android:paddingBottom="@dimen/widget_preview_label_vertical_padding" 25 android:paddingLeft="@dimen/widget_preview_label_horizontal_padding" 26 android:paddingRight="@dimen/widget_preview_label_horizontal_padding" 27 android:orientation="horizontal"> 28 29 <!-- The name of the widget. --> 30 <TextView 31 android:id="@+id/widget_name" 32 android:layout_width="0dp" 33 android:layout_height="wrap_content" 34 android:layout_weight="1" 35 android:ellipsize="end" 36 android:fadingEdge="horizontal" 37 android:gravity="start" 38 android:singleLine="true" 39 android:maxLines="1" 40 android:textColor="?android:attr/textColorSecondary" 41 android:textSize="14sp" /> 42 43 <!-- The original dimensions of the widget (can't be the same text as above due to different 44 style. --> 45 <TextView 46 android:id="@+id/widget_dims" 47 android:layout_width="wrap_content" 48 android:layout_height="wrap_content" 49 android:layout_marginStart="5dp" 50 android:layout_marginLeft="5dp" 51 android:textColor="?android:attr/textColorSecondary" 52 android:textSize="14sp" 53 android:alpha="0.8" /> 54 </LinearLayout> 55 56 <!-- The image of the widget. This view does not support padding. Any placement adjustment 57 should be done using margins. --> 58 <com.android.launcher3.widget.WidgetImageView 59 android:id="@+id/widget_preview" 60 android:layout_width="match_parent" 61 android:layout_height="0dp" 62 android:layout_weight="1" /> 63</merge>