appwidget.xml revision b61402e2cc2b64c0173d7a230789e50d1d2a22f5
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2009 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:id="@+id/appwidget"
20    android:layout_width="match_parent"
21    android:layout_height="match_parent"
22    android:orientation="vertical"
23    android:background="@drawable/appwidget_background"
24    android:focusable="true"
25    android:clickable="true">
26
27    <!-- Header -->
28    <LinearLayout
29        android:id="@+id/header"
30        android:layout_width="match_parent"
31        android:layout_height="wrap_content"
32        android:orientation="horizontal"
33        android:background="@drawable/appwidget_calendar_bgtop_blue">
34
35        <ImageView
36            android:id="@+id/widget_logo"
37            android:src="@drawable/app_icon"
38            android:layout_width="50dip"
39            android:layout_height="50dip"
40            android:layout_marginLeft="5dip"
41            android:layout_marginRight="10dip"
42            android:scaleType="centerInside" />
43
44        <LinearLayout
45            android:id="@+id/header_day"
46            android:layout_width="match_parent"
47            android:layout_height="match_parent"
48            android:layout_weight="1"
49            android:orientation="horizontal">
50            <TextView
51                android:id="@+id/day_of_week"
52                android:layout_width="wrap_content"
53                android:layout_height="match_parent"
54                android:layout_weight="1"
55                android:layout_marginLeft="7dip"
56                android:layout_marginRight="7dip"
57                android:layout_marginBottom="5dip"
58                android:textColor="@color/appwidget_date"
59                android:textSize="20sp"
60                android:gravity="left|bottom"
61                android:singleLine="true" />
62
63            <TextView
64                android:id="@+id/day_of_month"
65                android:layout_width="wrap_content"
66                android:layout_height="match_parent"
67                android:layout_marginLeft="7dip"
68                android:layout_marginRight="7dip"
69                android:layout_marginBottom="5dip"
70                android:gravity="right|bottom"
71                android:textColor="@color/appwidget_date"
72                android:textSize="22sp"
73                android:textStyle="bold"
74                android:singleLine="true" />
75        </LinearLayout>
76
77        <ImageButton
78            android:id="@+id/new_event_button"
79            android:layout_width="wrap_content"
80            android:layout_height="match_parent"
81            android:src="@drawable/appwidget_btn_round_plus"
82            android:background="#0000" />
83    </LinearLayout>
84
85    <!-- Events container -->
86    <ListView
87        android:id="@+id/events_list"
88        android:layout_width="match_parent"
89        android:layout_height="match_parent"
90        android:cacheColorHint="#00000000"/>
91
92</LinearLayout>
93