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