Skip to content

Commit 597c2ea

Browse files
author
Tim Su
committed
Initial big widget commit
1 parent 972361d commit 597c2ea

38 files changed

+1522
-1
lines changed

art/scroll_arrows.xcf

2.58 KB
Binary file not shown.

art/speech_bubble.xcf

1.84 KB
Binary file not shown.

art/widget-4x4.xcf

5.23 KB
Binary file not shown.

astrid/AndroidManifest.xml

+16
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@
124124
<action android:name="android.intent.action.MAIN" />
125125
</intent-filter>
126126
</activity>
127+
<!-- Activity to configure Power Pack widget -->
128+
<activity android:name="com.todoroo.astrid.widget.ConfigurePowerWidgetActivity">
129+
<intent-filter>
130+
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
131+
</intent-filter>
132+
</activity>
127133

128134
<!-- ======================================================= Receivers = -->
129135

@@ -136,6 +142,15 @@
136142
<meta-data android:name="android.appwidget.provider"
137143
android:resource="@xml/widget_provider_info" />
138144
</receiver>
145+
<receiver android:name="com.todoroo.astrid.widget.PowerWidget"
146+
android:label="@string/PPW_widget_44_label"
147+
android:icon="@drawable/icon_pp" >
148+
<intent-filter>
149+
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
150+
</intent-filter>
151+
<meta-data android:name="android.appwidget.provider"
152+
android:resource="@xml/power_widget_44_provider_info" />
153+
</receiver>
139154

140155
<receiver android:name="com.todoroo.astrid.service.GlobalEventReceiver">
141156
<intent-filter>
@@ -146,6 +161,7 @@
146161
<!-- ======================================================== Services = -->
147162

148163
<service android:name="com.todoroo.astrid.widget.TasksWidget$UpdateService" />
164+
<service android:name="com.todoroo.astrid.widget.PowerWidget$UpdateService" />
149165

150166
<!-- ======================================================= Providers = -->
151167

astrid/astrid.launch

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<stringAttribute key="ch.zork.quicklaunch.mode" value="run"/>
88
<intAttribute key="com.android.ide.eclipse.adt.action" value="0"/>
99
<stringAttribute key="com.android.ide.eclipse.adt.activity" value="com.todoroo.astrid.core.CustomFilterActivity"/>
10-
<stringAttribute key="com.android.ide.eclipse.adt.avd" value="android-22"/>
1110
<stringAttribute key="com.android.ide.eclipse.adt.commandline" value="-scale 0.7"/>
1211
<intAttribute key="com.android.ide.eclipse.adt.delay" value="0"/>
1312
<booleanAttribute key="com.android.ide.eclipse.adt.nobootanim" value="true"/>

astrid/res/drawable-hdpi/checkbox.png

1.82 KB
Loading

astrid/res/drawable-mdpi/checkbox.png

1.29 KB
Loading
188 Bytes
Loading
189 Bytes
Loading
189 Bytes
Loading
188 Bytes
Loading
188 Bytes
Loading
188 Bytes
Loading
285 Bytes
Loading
290 Bytes
Loading
280 Bytes
Loading
276 Bytes
Loading
330 Bytes
Loading
475 Bytes
Loading
490 Bytes
Loading
479 Bytes
Loading
480 Bytes
Loading
199 Bytes
Loading

astrid/res/drawable/icon_plus.png

3.34 KB
Loading
+183
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
4+
android:layout_width="fill_parent"
5+
android:layout_height="fill_parent"
6+
>
7+
<LinearLayout
8+
android:id="@+id/widget_bg_black"
9+
android:layout_width="fill_parent"
10+
android:layout_height="fill_parent"
11+
android:background="@drawable/widget_bg_44_black"
12+
android:visibility="gone"
13+
/>
14+
<LinearLayout
15+
android:id="@+id/widget_bg_blue"
16+
android:layout_width="fill_parent"
17+
android:layout_height="fill_parent"
18+
android:background="@drawable/widget_bg_44_blue"
19+
android:visibility="gone"
20+
/>
21+
<LinearLayout
22+
android:id="@+id/widget_bg_red"
23+
android:layout_width="fill_parent"
24+
android:layout_height="fill_parent"
25+
android:background="@drawable/widget_bg_44_red"
26+
android:visibility="gone"
27+
/>
28+
<LinearLayout
29+
android:id="@+id/widget_bg_white"
30+
android:layout_width="fill_parent"
31+
android:layout_height="fill_parent"
32+
android:background="@drawable/widget_bg_44_white"
33+
android:visibility="gone"
34+
/>
35+
<RelativeLayout
36+
android:id="@+id/widget"
37+
android:layout_width="fill_parent"
38+
android:layout_height="fill_parent"
39+
android:padding="10dp">
40+
41+
<!-- header section -->
42+
<LinearLayout
43+
android:id="@+id/header"
44+
android:layout_width="fill_parent"
45+
android:layout_height="36dp"
46+
android:paddingTop="0dp"
47+
android:paddingBottom="0dp"
48+
android:paddingLeft="7dp"
49+
android:paddingRight="0dp"
50+
android:orientation="horizontal"
51+
android:layout_alignParentTop="true">
52+
<TextView
53+
android:id="@+id/widget_title"
54+
android:layout_width="fill_parent"
55+
android:layout_height="wrap_content"
56+
android:layout_weight="1"
57+
android:layout_gravity="left"
58+
android:textColor="#ffffff"
59+
android:textSize="20sp"
60+
android:textStyle="bold"
61+
android:gravity="center"
62+
android:paddingTop="3dp"
63+
android:paddingBottom="2dp"
64+
android:ellipsize="start" />
65+
<LinearLayout
66+
android:visibility="gone"
67+
android:layout_width="wrap_content"
68+
android:layout_height="36dp"
69+
android:paddingTop="10dp"
70+
android:paddingBottom="9dp"
71+
android:paddingLeft="10dp"
72+
android:paddingRight="9dp" >
73+
<ImageView
74+
android:src="@drawable/button_plus"
75+
android:layout_width="17dp"
76+
android:layout_height="17dp"
77+
/>
78+
</LinearLayout>
79+
</LinearLayout>
80+
81+
82+
<RelativeLayout
83+
android:layout_width="fill_parent"
84+
android:layout_height="wrap_content"
85+
android:layout_below="@+id/header"
86+
android:layout_alignParentBottom="true"
87+
android:paddingBottom="5dp">
88+
89+
<LinearLayout
90+
android:id="@+id/task_list"
91+
android:layout_width="wrap_content"
92+
android:layout_height="wrap_content"
93+
android:orientation="vertical"
94+
android:gravity="fill_vertical"
95+
android:layout_alignParentTop="true"
96+
android:layout_alignParentBottom="true"
97+
android:layout_alignParentLeft="true"
98+
android:layout_toLeftOf="@+id/footer">
99+
</LinearLayout>
100+
101+
<RelativeLayout
102+
android:id="@+id/footer"
103+
android:layout_width="wrap_content"
104+
android:layout_height="fill_parent"
105+
android:paddingLeft="7dp"
106+
android:paddingRight="7dp"
107+
android:layout_alignParentTop="true"
108+
android:layout_alignParentBottom="true"
109+
android:layout_alignParentRight="true">
110+
<ImageView
111+
android:id="@+id/scroll_up"
112+
android:src="@drawable/scroll_up"
113+
android:layout_width="36dp"
114+
android:layout_height="36dp"
115+
android:layout_alignParentTop="true"
116+
/>
117+
<LinearLayout
118+
android:id="@+id/button_plus"
119+
android:layout_width="wrap_content"
120+
android:layout_height="36dp"
121+
android:paddingTop="10dp"
122+
android:paddingBottom="9dp"
123+
android:paddingLeft="10dp"
124+
android:paddingRight="9dp"
125+
android:layout_below="@+id/scroll_up"
126+
android:layout_above="@+id/scroll_down"
127+
android:gravity="center_vertical">
128+
<ImageView
129+
android:src="@drawable/button_plus"
130+
android:layout_width="17dp"
131+
android:layout_height="17dp"
132+
/>
133+
</LinearLayout>
134+
<ImageView
135+
android:id="@+id/scroll_down"
136+
android:src="@drawable/scroll_down"
137+
android:layout_width="36dp"
138+
android:layout_height="36dp"
139+
android:layout_alignParentBottom="true"
140+
/>
141+
</RelativeLayout>
142+
143+
</RelativeLayout>
144+
145+
</RelativeLayout>
146+
147+
<RelativeLayout
148+
android:id="@+id/encouragement"
149+
android:layout_width="fill_parent"
150+
android:layout_height="wrap_content"
151+
android:visibility="gone">
152+
<LinearLayout
153+
android:id="@+id/speech_bubble"
154+
android:layout_alignParentLeft="true"
155+
android:layout_toLeftOf="@+id/icon"
156+
android:layout_width="wrap_content"
157+
android:layout_height="wrap_content"
158+
android:orientation="horizontal"
159+
android:paddingTop="8dp"
160+
android:paddingBottom="8dp"
161+
android:paddingRight="20dp"
162+
android:paddingLeft="12dp"
163+
android:background="@drawable/speech_bubble"
164+
android:gravity="fill_horizontal" >
165+
<TextView
166+
android:id="@+id/encouragement_text"
167+
android:layout_width="wrap_content"
168+
android:gravity="top"
169+
android:textColor="#ffffff"
170+
android:textSize="14sp"
171+
android:layout_height="38dp"/>
172+
</LinearLayout>
173+
<ImageView
174+
android:id="@+id/icon"
175+
android:src="@drawable/icon_blank"
176+
android:layout_width="48dp"
177+
android:layout_height="48dp"
178+
android:layout_alignParentRight="true"
179+
android:layout_alignBottom="@+id/speech_bubble"
180+
android:layout_marginBottom="4dp"/>
181+
</RelativeLayout>
182+
183+
</FrameLayout>

0 commit comments

Comments
 (0)