2011-04-28 08:40:20 +08:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2015-04-09 10:01:34 +08:00
|
|
|
<!-- Copyright (C) 2015 The Android Open Source Project
|
2011-04-28 08:40:20 +08:00
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
2015-04-09 10:01:34 +08:00
|
|
|
<com.android.launcher3.widget.WidgetCell
|
2011-04-28 08:40:20 +08:00
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
2014-11-04 03:39:27 +08:00
|
|
|
xmlns:launcher="http://schemas.android.com/apk/res-auto"
|
2015-04-18 10:02:30 +08:00
|
|
|
android:layout_width="@dimen/widget_preview_container_width"
|
2015-04-28 08:01:32 +08:00
|
|
|
android:layout_height="@dimen/widget_cell_height"
|
2011-04-28 08:40:20 +08:00
|
|
|
android:layout_weight="1"
|
2015-05-12 05:55:07 +08:00
|
|
|
android:layout_marginEnd="@dimen/widget_row_divider"
|
2011-04-28 08:40:20 +08:00
|
|
|
android:orientation="vertical"
|
2015-04-28 08:01:32 +08:00
|
|
|
android:background="@color/widgets_cell_color"
|
2015-05-12 05:55:07 +08:00
|
|
|
android:focusable="true"
|
|
|
|
android:gravity="center_horizontal">
|
2011-04-28 08:40:20 +08:00
|
|
|
|
2011-06-16 10:51:24 +08:00
|
|
|
<LinearLayout
|
2015-04-18 10:02:30 +08:00
|
|
|
android:layout_width="wrap_content"
|
2011-06-16 10:51:24 +08:00
|
|
|
android:layout_height="wrap_content"
|
2015-04-09 10:01:34 +08:00
|
|
|
android:paddingTop="@dimen/widget_preview_label_vertical_padding"
|
|
|
|
android:paddingBottom="@dimen/widget_preview_label_vertical_padding"
|
|
|
|
android:paddingLeft="@dimen/widget_preview_label_horizontal_padding"
|
|
|
|
android:paddingRight="@dimen/widget_preview_label_horizontal_padding"
|
2011-10-26 06:40:08 +08:00
|
|
|
android:orientation="horizontal">
|
2015-04-09 10:01:34 +08:00
|
|
|
|
2011-06-16 10:51:24 +08:00
|
|
|
<!-- The name of the widget. -->
|
2014-11-04 03:39:27 +08:00
|
|
|
<TextView
|
2011-06-16 10:51:24 +08:00
|
|
|
android:id="@+id/widget_name"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2011-08-12 06:12:11 +08:00
|
|
|
android:layout_weight="1"
|
2012-12-19 08:25:49 +08:00
|
|
|
android:gravity="start"
|
2011-06-25 06:22:14 +08:00
|
|
|
android:singleLine="true"
|
2015-04-10 07:54:31 +08:00
|
|
|
android:ellipsize="end"
|
2011-06-25 06:22:14 +08:00
|
|
|
android:fadingEdge="horizontal"
|
2015-05-02 01:55:53 +08:00
|
|
|
android:textColor="@color/widgets_view_item_text_color"
|
2015-04-24 06:17:50 +08:00
|
|
|
android:textSize="16sp"
|
2013-09-24 07:53:31 +08:00
|
|
|
android:textAlignment="viewStart"
|
|
|
|
android:fontFamily="sans-serif-condensed"
|
|
|
|
android:shadowRadius="2.0"
|
|
|
|
android:shadowColor="#B0000000" />
|
2011-06-16 10:51:24 +08:00
|
|
|
|
|
|
|
<!-- The original dimensions of the widget (can't be the same text as above due to different
|
|
|
|
style. -->
|
2014-11-04 03:39:27 +08:00
|
|
|
<TextView
|
2011-06-16 10:51:24 +08:00
|
|
|
android:id="@+id/widget_dims"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2012-12-19 08:25:49 +08:00
|
|
|
android:layout_marginStart="5dp"
|
2015-04-09 10:01:34 +08:00
|
|
|
android:layout_marginLeft="5dp"
|
2011-06-16 10:51:24 +08:00
|
|
|
android:layout_weight="0"
|
2012-12-19 08:25:49 +08:00
|
|
|
android:gravity="start"
|
2015-05-02 01:55:53 +08:00
|
|
|
android:textColor="@color/widgets_view_item_text_color"
|
2015-04-24 06:17:50 +08:00
|
|
|
android:textSize="16sp"
|
2015-04-18 10:02:30 +08:00
|
|
|
android:textAlignment="viewStart"
|
2013-09-24 07:53:31 +08:00
|
|
|
android:fontFamily="sans-serif-condensed"
|
|
|
|
android:shadowRadius="2.0"
|
|
|
|
android:shadowColor="#B0000000" />
|
2011-06-16 10:51:24 +08:00
|
|
|
</LinearLayout>
|
|
|
|
|
2015-04-09 10:01:34 +08:00
|
|
|
<!-- The image of the widget. -->
|
|
|
|
<com.android.launcher3.widget.WidgetImageView
|
|
|
|
android:id="@+id/widget_preview"
|
|
|
|
style="@style/WidgetImageView"
|
2015-04-18 10:02:30 +08:00
|
|
|
android:layout_width="match_parent"
|
2015-04-09 10:01:34 +08:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:scaleType="matrix" />
|
2012-05-19 06:04:49 +08:00
|
|
|
|
2015-04-09 10:01:34 +08:00
|
|
|
</com.android.launcher3.widget.WidgetCell>
|