Home | History | Annotate | Download | only in layout
      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     <!-- The preview of the widget or shortcut. -->
     29     <com.android.launcher3.PagedViewWidgetImageView
     30         android:id="@+id/widget_preview"
     31         style="@style/PagedViewWidgetImageView"
     32         android:layout_width="match_parent"
     33         android:layout_height="wrap_content"
     34         android:layout_weight="1"
     35         android:paddingTop="@dimen/app_widget_preview_padding_top"
     36         android:paddingEnd="@dimen/app_widget_preview_padding_right"
     37         android:paddingRight="@dimen/app_widget_preview_padding_right"
     38         android:scaleType="matrix"
     39         android:background="@drawable/screenpanel" />
     40     <LinearLayout
     41         android:layout_width="match_parent"
     42         android:layout_height="wrap_content"
     43         android:layout_marginTop="@dimen/app_widget_preview_label_margin_top"
     44         android:layout_marginStart="@dimen/app_widget_preview_label_margin_left"
     45         android:layout_marginEnd="@dimen/app_widget_preview_label_margin_right"
     46         android:orientation="horizontal">
     47         <!-- The name of the widget. -->
     48         <TextView xmlns:android="http://schemas.android.com/apk/res/android"
     49             android:id="@+id/widget_name"
     50             android:layout_width="wrap_content"
     51             android:layout_height="wrap_content"
     52             android:layout_weight="1"
     53             android:gravity="start"
     54             android:singleLine="true"
     55             android:ellipsize="marquee"
     56             android:fadingEdge="horizontal"
     57 
     58             android:textColor="#FFFFFFFF"
     59             android:textSize="13sp"
     60             android:textAlignment="viewStart"
     61             android:fontFamily="sans-serif-condensed"
     62             android:shadowRadius="2.0"
     63             android:shadowColor="#B0000000" />
     64 
     65         <!-- The original dimensions of the widget (can't be the same text as above due to different
     66              style. -->
     67         <TextView xmlns:android="http://schemas.android.com/apk/res/android"
     68             android:id="@+id/widget_dims"
     69             android:layout_width="wrap_content"
     70             android:layout_height="wrap_content"
     71             android:layout_gravity="center"
     72             android:layout_marginStart="5dp"
     73             android:layout_weight="0"
     74             android:gravity="start"
     75 
     76             android:textColor="#FFAAAAAA"
     77             android:textSize="12sp"
     78             android:fontFamily="sans-serif-condensed"
     79             android:shadowRadius="2.0"
     80             android:shadowColor="#B0000000" />
     81     </LinearLayout>
     82 
     83 
     84 </com.android.launcher3.PagedViewWidget>
     85