• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2011 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<com.android.launcher3.PagedViewWidget
17    xmlns:android="http://schemas.android.com/apk/res/android"
18    xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"
19
20    android:layout_width="match_parent"
21    android:layout_height="match_parent"
22    android:layout_weight="1"
23    android:orientation="vertical"
24
25    android:background="@drawable/focusable_view_bg"
26    android:focusable="true">
27
28    <LinearLayout
29        android:orientation="horizontal"
30        android:layout_width="match_parent"
31        android:layout_height="wrap_content"
32        android:layout_weight="1">
33        <FrameLayout
34            android:id="@+id/left_border"
35            android:layout_width="1dp"
36            android:layout_height="match_parent"
37            android:background="@color/widget_text_panel"
38            android:visibility="gone" />
39
40        <!-- The preview of the widget or shortcut. -->
41        <com.android.launcher3.PagedViewWidgetImageView
42            android:id="@+id/widget_preview"
43            style="@style/PagedViewWidgetImageView"
44            android:layout_width="match_parent"
45            android:layout_height="match_parent"
46            android:layout_weight="1"
47            android:paddingTop="@dimen/app_widget_preview_padding_top"
48            android:paddingEnd="@dimen/app_widget_preview_padding_right"
49            android:paddingRight="@dimen/app_widget_preview_padding_right"
50            android:scaleType="matrix" />
51        <FrameLayout
52            android:id="@+id/right_border"
53            android:layout_width="1dp"
54            android:layout_height="match_parent"
55            android:background="@color/widget_text_panel"
56            android:visibility="gone" />
57    </LinearLayout>
58
59    <LinearLayout
60        android:layout_width="match_parent"
61        android:layout_height="wrap_content"
62        android:paddingTop="@dimen/app_widget_preview_label_vertical_padding"
63        android:paddingBottom="@dimen/app_widget_preview_label_vertical_padding"
64        android:paddingLeft="@dimen/app_widget_preview_label_horizontal_padding"
65        android:paddingRight="@dimen/app_widget_preview_label_horizontal_padding"
66        android:background="@color/widget_text_panel"
67        android:orientation="horizontal">
68        <!-- The name of the widget. -->
69        <TextView xmlns:android="http://schemas.android.com/apk/res/android"
70            android:id="@+id/widget_name"
71            android:layout_width="wrap_content"
72            android:layout_height="wrap_content"
73            android:layout_weight="1"
74            android:gravity="start"
75            android:singleLine="true"
76            android:ellipsize="marquee"
77            android:fadingEdge="horizontal"
78
79            android:textColor="#FFFFFFFF"
80            android:textSize="12sp"
81            android:textAlignment="viewStart"
82            android:fontFamily="sans-serif-condensed"
83            android:shadowRadius="2.0"
84            android:shadowColor="#B0000000" />
85
86        <!-- The original dimensions of the widget (can't be the same text as above due to different
87             style. -->
88        <TextView xmlns:android="http://schemas.android.com/apk/res/android"
89            android:id="@+id/widget_dims"
90            android:layout_width="wrap_content"
91            android:layout_height="wrap_content"
92            android:layout_gravity="center"
93            android:layout_marginStart="5dp"
94            android:layout_weight="0"
95            android:gravity="start"
96
97            android:textColor="#FFFFFFFF"
98            android:textSize="12sp"
99            android:fontFamily="sans-serif-condensed"
100            android:shadowRadius="2.0"
101            android:shadowColor="#B0000000" />
102    </LinearLayout>
103
104
105</com.android.launcher3.PagedViewWidget>
106