Home | History | Annotate | Download | only in layout
      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:fontFamily="sans-serif-condensed"
     38             android:gravity="center"
     39             android:singleLine="true"
     40             android:maxLines="1"
     41             android:textColor="?android:attr/textColorSecondary"
     42             android:textSize="14sp" />
     43 
     44         <!-- The original dimensions of the widget (can't be the same text as above due to different
     45              style. -->
     46         <TextView
     47             android:id="@+id/widget_dims"
     48             android:layout_width="wrap_content"
     49             android:layout_height="wrap_content"
     50             android:layout_marginStart="5dp"
     51             android:layout_marginLeft="5dp"
     52             android:visibility="gone"
     53             android:textColor="?android:attr/textColorSecondary"
     54             android:textSize="14sp"
     55             android:fontFamily="sans-serif-condensed"
     56             android:alpha="0.8" />
     57     </LinearLayout>
     58 
     59     <!-- The image of the widget. This view does not support padding. Any placement adjustment
     60          should be done using margins. -->
     61     <com.android.launcher3.widget.WidgetImageView
     62         android:id="@+id/widget_preview"
     63         android:layout_width="match_parent"
     64         android:layout_height="0dp"
     65         android:layout_weight="1" />
     66 </merge>