• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2010 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
17<LinearLayout
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    android:layout_width="match_parent"
20    android:layout_height="match_parent"
21    android:layout_marginTop="@dimen/widget_margin_top"
22    android:layout_marginLeft="@dimen/widget_margin_left"
23    android:layout_marginRight="@dimen/widget_margin_right"
24    android:layout_marginBottom="@dimen/widget_margin_bottom"
25    android:orientation="vertical">
26    <LinearLayout
27        android:layout_width="match_parent"
28        android:layout_height="48dip"
29        android:gravity="center_vertical"
30        android:paddingLeft="8dip"
31        android:paddingRight="8dip"
32        android:orientation="horizontal"
33        android:background="@drawable/header_bg_email_widget_holo"
34        android:id="@+id/widget_header">
35        <ImageView
36            android:id="@+id/widget_logo"
37            android:layout_width="32dip"
38            android:layout_height="32dip"
39            android:layout_marginRight="8dip"
40            android:src="@mipmap/ic_launcher_email" />
41        <LinearLayout
42            android:id="@+id/widget_header"
43            android:layout_width="0dip"
44            android:layout_height="wrap_content"
45            android:layout_weight="1"
46            android:orientation="vertical">
47            <TextView
48                android:id="@+id/widget_title"
49                android:layout_width="match_parent"
50                android:layout_height="wrap_content"
51                android:textAppearance="?android:attr/textAppearanceMedium"
52                android:text="@string/widget_all_mail"
53                android:textColor="@color/widget_title_color"
54                />
55            <TextView
56                android:id="@+id/widget_tap"
57                android:layout_width="match_parent"
58                android:layout_height="wrap_content"
59                android:singleLine="true"
60                android:textAppearance="?android:attr/textAppearanceSmall"
61                android:text="@string/widget_other_views"
62                android:textColor="@color/widget_title_color"
63                />
64        </LinearLayout>
65        <!-- Note: We can't set "freezesText" on the widget_unread_count view, as the launcher can
66            restore stale data over updated data. -->
67        <TextView
68            android:id="@+id/widget_count"
69            android:layout_width="wrap_content"
70            android:layout_height="wrap_content"
71            android:layout_marginRight="12dip"
72            android:textSize="36sp"
73            android:textStyle="bold"
74            android:textColor="@color/widget_unread_color" />
75        <ImageView
76            android:id="@+id/widget_compose"
77            android:layout_width="wrap_content"
78            android:layout_height="wrap_content"
79            android:src="@drawable/ic_menu_compose_normal_holo_light"
80            android:contentDescription="@string/compose_action" />
81    </LinearLayout>
82    <ListView
83        android:id="@+id/message_list"
84        android:layout_width="match_parent"
85        android:layout_height="wrap_content"
86        android:layout_weight="1"
87        android:cacheColorHint="#00000000"
88        android:background="@drawable/gradient_bg_email_widget_holo" />
89
90    <!-- TODO: remove this tap to configure logic. It's obsolete. -->
91    <TextView
92        android:id="@+id/tap_to_configure"
93        android:layout_width="match_parent"
94        android:layout_height="wrap_content"
95        android:layout_marginLeft="5dip"
96        android:layout_marginRight="5dip"
97        android:layout_weight="1"
98        android:layout_gravity="fill"
99        android:gravity="center"
100        android:text="@string/widget_touch_to_configure"
101        android:textSize="16sp"
102        android:visibility="gone"/>
103    <ImageView
104        android:layout_width="match_parent"
105        android:layout_height="wrap_content"
106        android:background="@drawable/list_div_top_btm_email_widget_holo" />
107</LinearLayout>
108