Add widget previews to the key guard widget picker

Bug: 7381803

Change-Id: I86946b7d0d75f8a1f89120600be2513bdf9026f0
This commit is contained in:
Michael Jurka
2012-11-02 23:05:34 -07:00
parent ab3472f594
commit 4119788b1b
4 changed files with 324 additions and 247 deletions

View File

@@ -15,21 +15,33 @@
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/icon_and_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dip"
android:layout_marginRight="8dip"
android:layout_marginTop="4dip"
android:layout_marginBottom="4dip"
android:background="@drawable/appwidget_item_bg"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:textAppearance="?android:attr/textAppearanceMedium"
android:gravity="center_vertical"
android:drawablePadding="8dip"
android:paddingStart="11dip"
android:paddingEnd="11dip" />
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@drawable/appwidget_item_bg"
android:layout_marginTop="2dip"
android:layout_marginBottom="2dip"
android:layout_marginLeft="8dip"
android:layout_marginRight="8dip"
android:paddingLeft="16dip"
android:paddingRight="16dip"
android:paddingTop="16dip"
android:paddingBottom="16dip" >
<ImageView
android:id="@+id/icon"
android:layout_width="@dimen/appwidget_preview_width"
android:layout_height="@dimen/appwidget_preview_height"
android:scaleType="center" />
<TextView
android:id="@+id/label"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="24dip"
android:paddingBottom="8dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:gravity="left|bottom" />
</LinearLayout>
</FrameLayout>

View File

@@ -18,6 +18,8 @@
android:id="@+id/layout_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="2dip"
android:paddingBottom="2dip"
android:orientation="vertical" >
<GridView android:layout_width="match_parent"
android:layout_height="0dp"