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    <com.android.launcher3.widget.WidgetCellPreview
21        android:id="@+id/widget_preview_container"
22        android:layout_width="0dp"
23        android:layout_height="0dp"
24        android:layout_weight="1"
25        android:importantForAccessibility="no"
26        android:layout_marginVertical="8dp">
27        <!-- The image of the widget. This view does not support padding. Any placement adjustment
28             should be done using margins. Width & height are set at runtime after scaling the
29             preview image. -->
30        <com.android.launcher3.widget.WidgetImageView
31            android:id="@+id/widget_preview"
32            android:layout_width="match_parent"
33            android:layout_height="match_parent"
34            android:importantForAccessibility="no"
35            android:layout_gravity="fill"/>
36
37        <ImageView
38            android:id="@+id/widget_badge"
39            android:layout_width="wrap_content"
40            android:layout_height="wrap_content"
41            android:importantForAccessibility="no"
42            android:layout_gravity="end|bottom"
43            android:layout_margin="@dimen/profile_badge_margin"/>
44    </com.android.launcher3.widget.WidgetCellPreview>
45
46    <!-- The name of the widget. -->
47    <TextView
48        android:id="@+id/widget_name"
49        android:layout_width="match_parent"
50        android:layout_height="wrap_content"
51        android:ellipsize="end"
52        android:fadingEdge="horizontal"
53        android:gravity="center_horizontal"
54        android:singleLine="true"
55        android:maxLines="1"
56        android:textColor="?android:attr/textColorPrimary"
57        android:textSize="@dimen/widget_cell_font_size" />
58
59    <!-- The original dimensions of the widget -->
60    <TextView
61        android:id="@+id/widget_dims"
62        android:layout_width="match_parent"
63        android:layout_height="wrap_content"
64        android:gravity="center_horizontal"
65        android:textColor="?android:attr/textColorSecondary"
66        android:textSize="@dimen/widget_cell_font_size"
67        android:alpha="0.7" />
68
69    <TextView
70        android:id="@+id/widget_description"
71        android:layout_width="match_parent"
72        android:layout_height="wrap_content"
73        android:gravity="center_horizontal"
74        android:textSize="@dimen/widget_cell_font_size"
75        android:textColor="?android:attr/textColorSecondary"
76        android:maxLines="2"
77        android:ellipsize="end"
78        android:fadingEdge="horizontal"
79        android:alpha="0.7" />
80
81</merge>