replicant-packages_apps_Email/res/layout/widget.xml
Todd Kennedy 46b8ea4b53 "final" tweaks to widget
* Add the background to the widget
* Updated background to a stretchable 9-patch
* Shift "Tap icon to change" text up a couple pixels

bug 3510984

Change-Id: I5ea65b802098c1af08e865f85fb5470e0a00b76b
2011-03-11 10:54:29 -08:00

129 lines
5.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project
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.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="5dip"
android:paddingBottom="2dip"
android:layout_marginTop="6dip"
android:layout_marginBottom="17dip"
android:layout_marginLeft="12dip"
android:layout_marginRight="12dip"
android:orientation="vertical"
android:background="@drawable/gradient_bg_email_widget_holo">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="42sp"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:orientation="horizontal"
android:paddingTop="4dip"
android:paddingLeft="8dip"
android:paddingRight="8dip"
android:background="@drawable/widget_header_bg">
<ImageView
android:id="@+id/widget_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="1sp"
android:paddingRight="8dip"
android:src="@drawable/ic_email_email_widget_holo" />
<LinearLayout
android:id="@+id/widget_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight = "1"
android:orientation="vertical">
<TextView
android:id="@+id/widget_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-1sp"
android:text="@string/widget_all_mail"
android:textSize="14sp"
android:textStyle="bold"
android:textColor="@android:color/white"
android:shadowColor="@color/widget_label_shadow_color"
android:shadowRadius="3"
android:freezesText="true" />
<TextView
android:id="@+id/widget_tap"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-5sp"
android:singleLine="true"
android:text="@string/widget_other_views"
android:textSize="14sp"
android:textColor="@color/widget_account_color" />
</LinearLayout>
<TextView
android:id="@+id/widget_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-16sp"
android:paddingRight="8dip"
android:textSize="48sp"
android:textColor="@color/widget_unread_count_color"
android:freezesText="true" />
<ImageView
android:id="@+id/widget_compose"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="2dip"
android:src="@drawable/btn_ic_new_email_email_widget_holo_dark" />
</LinearLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="2dip"
android:layout_marginRight="2dip"
android:background="@drawable/list_div_top_btm_email_widget_holo" />
<ListView
android:id="@+id/message_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:paddingTop="6dip"
android:clipToPadding="false"
android:fadingEdge="none"
android:divider="@drawable/list_div_email_widget_holo"
android:cacheColorHint="#00000000" />
<TextView
android:id="@+id/tap_to_configure"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:layout_weight="1"
android:layout_gravity="fill"
android:gravity="center"
android:paddingTop="6dip"
android:text="@string/widget_touch_to_configure"
android:textSize="16sp"
android:textColor="@android:color/white"
android:visibility="gone"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="2dip"
android:layout_marginRight="2dip"
android:background="@drawable/list_div_top_btm_email_widget_holo" />
</LinearLayout>