</activity>
<activity android:name="MonthActivity" android:label="@string/month_view"
- android:theme="@android:style/Theme.Light.NoTitleBar" />
+ android:theme="@style/CalendarTheme" />
<activity android:name="WeekActivity" android:label="@string/week_view"
- android:theme="@android:style/Theme.Light.NoTitleBar" />
+ android:theme="@style/CalendarTheme" />
<activity android:name="DayActivity" android:label="@string/day_view"
- android:theme="@android:style/Theme.Light.NoTitleBar" />
+ android:theme="@style/CalendarTheme" />
<activity android:name="AgendaActivity" android:label="@string/agenda_view"
android:theme="@android:style/Theme.Light"
android:exported="true" />
</activity>
<activity android:name="EventInfoActivity" android:label="@string/event_info_title"
- android:theme="@android:style/Theme.Light.NoTitleBar"
+ android:theme="@android:style/Theme.Light"
android:configChanges="orientation|keyboardHidden">
<intent-filter>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_window_focused="false" android:state_enabled="true"
+ android:drawable="@drawable/btn_circle_normal" />
+ <item android:state_window_focused="false" android:state_enabled="false"
+ android:drawable="@drawable/btn_circle_disable" />
+ <item android:state_pressed="true"
+ android:drawable="@drawable/btn_circle_pressed" />
+ <item android:state_focused="true" android:state_enabled="true"
+ android:drawable="@drawable/btn_circle_selected" />
+ <item android:state_enabled="true"
+ android:drawable="@drawable/btn_circle_normal" />
+ <item android:state_focused="true"
+ android:drawable="@drawable/btn_circle_disable_focused" />
+ <item
+ android:drawable="@drawable/btn_circle_disable" />
+</selector>
android:layout_height="wrap_content" />
</RelativeLayout>
- <ViewSwitcher android:id="@+id/switcher"
+ <FrameLayout
android:layout_width="fill_parent"
- android:layout_height="fill_parent" />
+ android:layout_height="0dip"
+ android:layout_weight="1.0"
+ android:foregroundGravity="fill_horizontal|top"
+ android:foreground="@*android:drawable/title_bar_shadow">
+ <ViewSwitcher android:id="@+id/switcher"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" />
+ </FrameLayout>
</LinearLayout>
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.
android:layout_height="fill_parent">
<LinearLayout android:id="@+id/event"
+ android:background="#fafafa"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
-
+
<!-- WHAT -->
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:padding="5dip">
-
+ style="@style/EditEvent_Layout">
+
<TextView android:id="@+id/what_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/what_label"
style="@style/TextAppearance.EditEvent_Label"/>
-
+
<EditText android:id="@+id/title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_what"
android:capitalize="words"/>
</LinearLayout>
-
+
<!-- WHEN -->
- <View
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:background="@android:drawable/divider_horizontal_dark"
- />
-
<LinearLayout android:id="@+id/when_container"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:padding="5dip">
-
+ style="@style/EditEvent_Layout">
+
<TextView android:id="@+id/from_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/edit_event_from_label"
style="@style/TextAppearance.EditEvent_Label"/>
-
+
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
-
+
<Button android:id="@+id/start_date"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
-
+ android:layout_width="0px"
+ android:layout_height="wrap_content"
+ android:layout_weight="7"
+ android:gravity="left|center_vertical"
+ style="?android:attr/textAppearanceMedium"/>
+
<Button android:id="@+id/start_time"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
-
+ android:layout_width="0px"
+ android:layout_height="wrap_content"
+ android:layout_weight="4"
+ android:gravity="left|center_vertical"
+ style="?android:attr/textAppearanceMedium"/>
+
</LinearLayout>
-
+
<TextView android:id="@+id/to_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/edit_event_to_label"
style="@style/TextAppearance.EditEvent_Label"/>
-
+
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
-
+
<Button android:id="@+id/end_date"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
-
+ android:layout_width="0px"
+ android:layout_height="wrap_content"
+ android:layout_weight="7"
+ android:gravity="left|center_vertical"
+ style="?android:attr/textAppearanceMedium"/>
+
<Button android:id="@+id/end_time"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
+ android:layout_width="0px"
+ android:layout_height="wrap_content"
+ android:layout_weight="4"
+ android:gravity="left|center_vertical"
+ style="?android:attr/textAppearanceMedium"/>
</LinearLayout>
-
- <CheckBox android:id="@+id/is_all_day"
- android:layout_width="wrap_content"
+
+ <LinearLayout
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:text="@string/edit_event_all_day_label"/>
+ android:gravity="center_vertical|right"
+ android:paddingBottom="5dip">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/edit_event_all_day_label"
+ android:paddingTop="1dip"
+ android:paddingRight="7dip"
+ style="?android:attr/textAppearanceMedium"/>
+ <CheckBox android:id="@+id/is_all_day"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingTop="15dip"
+ android:paddingBottom="15dip"
+ android:paddingRight="1dip"/>
+ </LinearLayout>
</LinearLayout>
<!-- WHERE -->
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
- android:background="@android:drawable/divider_horizontal_dark"
+ android:background="@android:drawable/divider_horizontal_bright"
/>
-
<LinearLayout android:id="@+id/where_container"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:padding="5dip">
-
+ style="@style/EditEvent_Layout">
+
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/where_label"
style="@style/TextAppearance.EditEvent_Label"/>
-
+
<EditText android:id="@+id/location"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
</LinearLayout>
<!-- DESCRIPTION -->
- <View
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:background="@android:drawable/divider_horizontal_dark"
- />
-
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:padding="5dip">
-
+ style="@style/EditEvent_Layout">
+
<TextView android:id="@+id/description_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/description_label"
style="@style/TextAppearance.EditEvent_Label"/>
-
+
<EditText android:id="@+id/description"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
</LinearLayout>
<!-- CALENDARS -->
- <View android:id="@+id/calendar_separator"
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:background="@android:drawable/divider_horizontal_dark"
- />
-
- <LinearLayout
+ <LinearLayout android:id="@+id/calendar_group"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:paddingLeft="5dip"
- android:paddingRight="5dip"
- android:paddingTop="5dip"
- android:paddingBottom="1dip">
-
- <TextView android:id="@+id/calendar_label"
+ style="@style/EditEvent_Layout">
+
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="1dip"
+ android:background="@android:drawable/divider_horizontal_dark"
+ />
+
+ <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/edit_event_calendar_label"
style="@style/TextAppearance.EditEvent_Label"/>
-
+
<Spinner android:id="@+id/calendars"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
-
- <!-- REMINDERS -->
- <View android:id="@+id/reminders_separator"
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:background="@android:drawable/divider_horizontal_dark"
- />
-
- <LinearLayout android:id="@+id/reminders_container"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:paddingLeft="5dip"
- android:paddingRight="5dip"
- android:paddingTop="5dip"
- android:paddingBottom="1dip">
-
- <TextView android:id="@+id/reminders_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/reminders_label"
- style="@style/TextAppearance.EditEvent_Label"/>
-
- <LinearLayout android:id="@+id/reminder_items_container"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
- </LinearLayout>
- </LinearLayout>
-
+
<!-- REPEATS -->
- <View
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:background="@android:drawable/divider_horizontal_dark"
- />
-
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:paddingLeft="5dip"
- android:paddingRight="5dip"
- android:paddingTop="5dip"
- android:paddingBottom="1dip">
-
+ style="@style/EditEvent_Layout">
+
<TextView android:id="@+id/repeats_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/repeats_label"
style="@style/TextAppearance.EditEvent_Label"/>
-
+
<Spinner android:id="@+id/repeats"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
-
+
<!-- MORE OPTIONS -->
<LinearLayout android:id="@+id/extra_options_container"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="gone">
-
+
<!-- PRESENCE -->
- <View
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:background="@android:drawable/divider_horizontal_dark"
- />
-
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:paddingLeft="5dip"
- android:paddingRight="5dip"
- android:paddingTop="5dip"
- android:paddingBottom="1dip">
-
+ style="@style/EditEvent_Layout">
+
<TextView android:id="@+id/presence_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/presence_label"
style="@style/TextAppearance.EditEvent_Label"/>
-
+
<Spinner android:id="@+id/availability"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:entries="@array/availability" />
</LinearLayout>
-
+
<!-- PRIVACY -->
- <View
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:background="@android:drawable/divider_horizontal_dark"
- />
-
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:paddingLeft="5dip"
- android:paddingRight="5dip"
- android:paddingTop="5dip"
- android:paddingBottom="1dip">
-
+ style="@style/EditEvent_Layout">
+
<TextView android:id="@+id/privacy_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/privacy_label"
style="@style/TextAppearance.EditEvent_Label"/>
-
+
<Spinner android:id="@+id/visibility"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:entries="@array/visibility" />
</LinearLayout>
</LinearLayout>
-
+
+ <!-- REMINDERS -->
+ <View android:id="@+id/reminders_separator"
+ android:layout_width="fill_parent"
+ android:layout_height="1dip"
+ android:background="@android:drawable/divider_horizontal_dark"
+ />
+
+ <LinearLayout android:id="@+id/reminders_container"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ style="@style/EditEvent_Layout">
+
+ <TextView android:id="@+id/reminders_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/reminders_label"
+ style="@style/TextAppearance.EditEvent_Label"/>
+
+ <LinearLayout android:id="@+id/reminder_items_container"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
+ </LinearLayout>
+ </LinearLayout>
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical|right"
+ android:paddingBottom="5dip">
+ <ImageButton android:id="@+id/reminder_add"
+ style="@style/PlusButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginRight="10dip"
+ android:gravity="center_vertical|right"
+ />
+ </LinearLayout>
+
<!-- BUTTONS -->
<LinearLayout
android:orientation="horizontal"
android:paddingTop="5dip"
android:paddingLeft="4dip"
android:paddingRight="4dip"
- android:paddingBottom="1dip"
+ android:paddingBottom="1dip"
android:background="@android:drawable/bottom_bar" >
-
+
<Button android:id="@+id/save"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="@string/save_label"
/>
-
+
<Button android:id="@+id/discard"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="@string/discard_label"
/>
-
+
<Button android:id="@+id/delete"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_height="wrap_content">
<Spinner android:id="@+id/reminder_value"
+ style="?android:attr/textAppearanceMedium"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:entries="@array/reminder_minutes_labels"/>
-
+
<ImageButton android:id="@+id/reminder_remove"
- style="?android:attr/buttonStyleInset"
- android:src="@android:drawable/ic_delete"
+ style="@style/MinusButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="2dip"
android:layout_height="fill_parent"
android:layout_weight="1.0" >
- <LinearLayout
+ <LinearLayout
android:orientation="vertical"
+ android:background="#fafafa"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:padding="8dip"
android:layout_alignParentTop="true" >
-
- <LinearLayout android:id="@+id/event"
- android:background="@drawable/bg_cal_card"
- android:orientation="vertical"
- android:layout_height="wrap_content"
+ <LinearLayout android:id="@+id/cal_background"
android:layout_width="fill_parent"
- android:layout_weight="1">
-
-
- <View android:id="@+id/strip"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="@drawable/strip_cal"
- />
-
- <!-- WHAT -->
- <TextView android:id="@+id/title"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:autoLink="all"
- android:textStyle="bold"
- android:padding="8dip"
- style="?android:attr/textAppearanceMedium"
- />
-
- <View android:id="@+id/divider"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="8dip"
- android:layout_marginRight="8dip"
- android:background="@android:drawable/divider_horizontal_dark"
- />
-
- <!-- WHEN -->
- <TextView android:id="@+id/when"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingTop="5dip"
- android:paddingLeft="8dip"
- android:paddingRight="8dip"
- android:textStyle="bold"
- style="?android:attr/textAppearanceSmall"
- />
+ android:layout_height="wrap_content"
+ android:paddingTop="10dip"
+ android:paddingBottom="8dip"
+ android:paddingLeft="8dip"
+ android:paddingRight="8dip">
- <!-- TIMEZONE -->
- <LinearLayout android:id="@+id/timezone_container"
- android:orientation="horizontal"
- android:paddingTop="5dip"
- android:paddingLeft="8dip"
- android:paddingRight="8dip"
+ <LinearLayout android:id="@+id/event"
+ android:background="@drawable/bg_cal_card"
+ android:orientation="vertical"
+ android:layout_height="wrap_content"
android:layout_width="fill_parent"
- android:layout_height="wrap_content">
-
- <TextView android:id="@+id/timezone_label"
- android:layout_width="wrap_content"
+ android:layout_weight="1">
+
+ <!-- WHAT -->
+ <TextView android:id="@+id/title"
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:layout_marginRight="5dip"
- android:text="@string/view_event_timezone_label"
- style="?android:attr/textAppearanceSmall"
+ android:autoLink="all"
+ android:textStyle="bold"
+ android:paddingBottom="7dip"
+ style="?android:attr/textAppearanceMedium"
/>
-
- <TextView android:id="@+id/timezone"
+
+ <View android:id="@+id/divider"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ android:background="@android:drawable/divider_horizontal_dark"
+ />
+
+ <!-- WHEN -->
+ <TextView android:id="@+id/when"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingTop="7dip"
android:textStyle="bold"
style="?android:attr/textAppearanceSmall"
/>
- </LinearLayout>
- <!-- REPEATS -->
- <LinearLayout android:id="@+id/repeat_container"
- android:orientation="horizontal"
- android:paddingLeft="8dip"
- android:paddingRight="8dip"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ <!-- TIMEZONE -->
+ <LinearLayout android:id="@+id/timezone_container"
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
- <ImageView android:id="@+id/repeat_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:src="@drawable/ic_repeat_dark"
- android:focusable="false"
- android:clickable="false"
- />
+ <TextView android:id="@+id/timezone_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginRight="5dip"
+ android:text="@string/view_event_timezone_label"
+ style="?android:attr/textAppearanceSmall"
+ />
+
+ <TextView android:id="@+id/timezone"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ style="?android:attr/textAppearanceSmall"
+ />
+ </LinearLayout>
+
+ <!-- REPEATS -->
+ <LinearLayout android:id="@+id/repeat_container"
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
+
+ <ImageView android:id="@+id/repeat_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:src="@drawable/ic_repeat_dark"
+ android:focusable="false"
+ android:clickable="false"
+ />
+
+ <TextView android:id="@+id/repeat"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="3dip"
+ style="?android:attr/textAppearanceSmall"
+ />
+ </LinearLayout>
- <TextView android:id="@+id/repeat"
+ <!-- WHERE -->
+ <TextView android:id="@+id/where"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:layout_marginLeft="3dip"
+ android:paddingLeft="8dip"
+ android:paddingRight="8dip"
+ android:autoLink="all"
style="?android:attr/textAppearanceSmall"
/>
- </LinearLayout>
-
- <!-- WHERE -->
- <TextView android:id="@+id/where"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:paddingLeft="8dip"
- android:paddingRight="8dip"
- android:autoLink="all"
- android:textStyle="bold"
- style="?android:attr/textAppearanceSmall"
- />
-
- <!-- DESCRIPTION -->
- <TextView android:id="@+id/description"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:paddingLeft="8dip"
- android:paddingRight="8dip"
- android:autoLink="all"
- style="?android:attr/textAppearanceSmall"
- />
- <!-- CALENDAR -->
- <LinearLayout android:id="@+id/calendar_container"
- android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:paddingLeft="8dip"
- android:paddingRight="8dip"
- android:paddingBottom="5dip"
- >
-
- <TextView android:id="@+id/calendar_label"
- android:layout_width="wrap_content"
+ <!-- DESCRIPTION -->
+ <TextView android:id="@+id/description"
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:layout_marginRight="5dip"
- android:text="@string/view_event_calendar_label"
+ android:paddingLeft="8dip"
+ android:paddingRight="8dip"
+ android:autoLink="all"
style="?android:attr/textAppearanceSmall"
/>
-
- <TextView android:id="@+id/calendar"
+
+ <!-- CALENDAR -->
+ <LinearLayout android:id="@+id/calendar_container"
+ android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:textStyle="bold"
- style="?android:attr/textAppearanceSmall"
- />
+ android:paddingBottom="5dip"
+ >
+
+ <TextView android:id="@+id/calendar_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginRight="5dip"
+ android:text="@string/view_event_calendar_label"
+ style="?android:attr/textAppearanceSmall"
+ />
+
+ <TextView android:id="@+id/calendar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ style="?android:attr/textAppearanceSmall"
+ />
+ </LinearLayout>
</LinearLayout>
</LinearLayout>
- <!-- REMINDERS -->
- <LinearLayout android:id="@+id/reminders_container"
+ <!-- RESPONSE -->
+ <LinearLayout android:id="@+id/response_container"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ android:paddingLeft="8dip"
+ android:paddingRight="8dip"
android:paddingTop="5dip"
android:paddingBottom="1dip">
- <TextView android:id="@+id/reminders_label"
+ <TextView android:id="@+id/response_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/reminders_label"
- style="?android:attr/textAppearanceMedium"/>
+ android:text="@string/view_event_response_label"
+ style="@style/TextAppearance.EditEvent_Label"/>
- <LinearLayout android:id="@+id/reminder_items_container"
- android:orientation="vertical"
+ <Spinner android:id="@+id/response_value"
+ style="?android:attr/textAppearanceMedium"
+ android:prompt="@string/view_event_response_label"
android:layout_width="fill_parent"
- android:layout_height="wrap_content">
- </LinearLayout>
+ android:layout_height="wrap_content"
+ android:entries="@array/response_labels1"/>
</LinearLayout>
- <!-- RESPONSE -->
- <LinearLayout android:id="@+id/response_container"
+ <!-- REMINDERS -->
+ <LinearLayout android:id="@+id/reminders_container"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ android:paddingLeft="8dip"
+ android:paddingRight="8dip"
android:paddingTop="5dip"
android:paddingBottom="1dip">
- <TextView android:id="@+id/response_label"
+ <TextView android:id="@+id/reminders_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/view_event_response_label"
- style="?android:attr/textAppearanceMedium"/>
-
- <Spinner android:id="@+id/response_value"
- android:prompt="@string/view_event_response_label"
+ android:text="@string/reminders_label"
+ style="@style/TextAppearance.EditEvent_Label"/>
+
+ <LinearLayout android:id="@+id/reminder_items_container"
+ style="?android:attr/textAppearanceMedium"
+ android:orientation="vertical"
android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
+ </LinearLayout>
+ </LinearLayout>
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:gravity="right"
+ android:paddingBottom="5dip">
+ <ImageButton android:id="@+id/reminder_add"
+ style="@style/PlusButton"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:entries="@array/response_labels1"/>
+ android:layout_marginRight="10dip"
+ />
</LinearLayout>
</LinearLayout>
</ScrollView>
android:layout_height="1dip"
android:background="@android:drawable/divider_horizontal_dark" />
- <ViewSwitcher android:id="@+id/switcher"
+ <FrameLayout
android:layout_width="fill_parent"
- android:layout_height="fill_parent" />
+ android:layout_height="0dip"
+ android:layout_weight="1.0"
+ android:foregroundGravity="fill_horizontal|top"
+ android:foreground="@*android:drawable/title_bar_shadow">
+ <ViewSwitcher android:id="@+id/switcher"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" />
+ </FrameLayout>
</LinearLayout>
android:layout_height="wrap_content" />
</RelativeLayout>
- <ViewSwitcher android:id="@+id/switcher"
+ <FrameLayout
android:layout_width="fill_parent"
- android:layout_height="fill_parent" />
+ android:layout_height="0dip"
+ android:layout_weight="1.0"
+ android:foregroundGravity="fill_horizontal|top"
+ android:foreground="@*android:drawable/title_bar_shadow">
+ <ViewSwitcher android:id="@+id/switcher"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" />
+ </FrameLayout>
</LinearLayout>
<string name="saving_event">"Ukládání události…"</string>
<string name="loading_calendars_title">"Načítání kalendářů"</string>
<string name="loading_calendars_message">"Načítání kalendářů..."</string>
+ <string name="alert_title">"Upozornění kalendáře"</string>
<string name="alert_when_label">"Kdy:"</string>
<string name="alert_where_label">"Kde:"</string>
<string name="alert_missed_events_single">"(zbývá <xliff:g id="REMINDER_COUNT">%s</xliff:g> připomenutí)"</string>
<string name="saving_event">"Termin wird gespeichert…"</string>
<string name="loading_calendars_title">"Kalender werden geladen."</string>
<string name="loading_calendars_message">"Kalender werden geladen..."</string>
+ <string name="alert_title">"Benachrichtigungen"</string>
<string name="alert_when_label">"Wann:"</string>
<string name="alert_where_label">"Wo:"</string>
<string name="alert_missed_events_single">"(<xliff:g id="REMINDER_COUNT">%s</xliff:g> weitere Erinnerung)"</string>
<string name="saving_event">"Guardando evento..."</string>
<string name="loading_calendars_title">"Cargando calendarios"</string>
<string name="loading_calendars_message">"Cargando calendarios..."</string>
+ <string name="alert_title">"Notificaciones de Calendar"</string>
<string name="alert_when_label">"Cuándo:"</string>
<string name="alert_where_label">"Dónde:"</string>
<string name="alert_missed_events_single">"(<xliff:g id="REMINDER_COUNT">%s</xliff:g> más recordatorios)"</string>
<string name="saving_event">"Enregistrement de l\'événement…"</string>
<string name="loading_calendars_title">"Chargement des agendas"</string>
<string name="loading_calendars_message">"Chargement des agendas..."</string>
+ <string name="alert_title">"Notifications de l\'agenda"</string>
<string name="alert_when_label">"Date :"</string>
<string name="alert_where_label">"Lieu :"</string>
<string name="alert_missed_events_single">"(<xliff:g id="REMINDER_COUNT">%s</xliff:g> rappel supplémentaire)"</string>
<string name="saving_event">"Salvataggio evento in corso…"</string>
<string name="loading_calendars_title">"Caricamento calendari"</string>
<string name="loading_calendars_message">"Caricamento calendari in corso..."</string>
+ <string name="alert_title">"Notifiche di Google Calendar"</string>
<string name="alert_when_label">"Intervallo di tempo:"</string>
<string name="alert_where_label">"Dove:"</string>
<string name="alert_missed_events_single">"(Altri <xliff:g id="REMINDER_COUNT">%s</xliff:g> promemoria)"</string>
</string-array>
<string-array name="preferences_alert_type_labels">
<item>"アラート"</item>
- <item>"ステータスバーの通知"</item>
- <item>"オフ"</item>
+ <item>"ステータスバー"</item>
+ <item>"OFF"</item>
</string-array>
<string-array name="availability">
<item>"予定あり"</item>
<item>"最終"</item>
</string-array>
<string-array name="response_labels1">
- <item>"(返答なし)"</item>
+ <item>"(出欠返信なし)"</item>
<item>"はい"</item>
<item>"未定"</item>
<item>"いいえ"</item>
<item>"いいえ"</item>
</string-array>
<string-array name="delete_repeating_labels">
- <item>"この予定のみ"</item>
+ <item>"この日の予定のみ"</item>
<item>"これ以降の予定"</item>
<item>"すべての予定"</item>
</string-array>
</string-array>
<string-array name="change_response_labels">
<item>"今回のみ"</item>
- <item>"一連の定期的な予定すべて"</item>
+ <item>"繰り返す予定すべて"</item>
</string-array>
</resources>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Order of weekday/day label in week view -->
+ <string name="weekday_day">%2$s %1$s</string>
+</resources>
<string name="week_view">"週"</string>
<string name="month_view">"月"</string>
<string name="event_view">"予定を表示"</string>
- <string name="event_create">"新しい予定"</string>
+ <string name="event_create">"予定を作成"</string>
<string name="event_edit">"予定を編集"</string>
<string name="event_delete">"予定を削除"</string>
<string name="goto_today">"今日"</string>
- <string name="menu_select_calendars">"マイ カレンダー"</string>
+ <string name="menu_select_calendars">"マイカレンダー"</string>
<string name="menu_preferences">"設定"</string>
<string name="plus_N_more">"(あと <xliff:g id="MORE_COUNT">%d</xliff:g> 件...)"</string>
- <string name="calendars_title">"マイ カレンダー"</string>
+ <string name="calendars_title">"マイカレンダー"</string>
<string name="add_calendars">"カレンダーを追加"</string>
<string name="remove_calendars">"カレンダーを削除"</string>
<string name="event_edit_title">"予定の詳細"</string>
- <string name="hint_what">"予定の名前"</string>
- <string name="hint_where">"予定の場所"</string>
- <string name="hint_description">"予定の説明"</string>
+ <string name="hint_what">"タイトル"</string>
+ <string name="hint_where">"場所"</string>
+ <string name="hint_description">"内容"</string>
<string name="creating_event">"予定を作成中..."</string>
<string name="saving_event">"予定を保存中..."</string>
<string name="loading_calendars_title">"カレンダーを読み込み中"</string>
<string name="loading_calendars_message">"カレンダーを読み込み中..."</string>
+ <string name="alert_title">"カレンダーの通知"</string>
<string name="alert_when_label">"日時:"</string>
<string name="alert_where_label">"場所:"</string>
<string name="alert_missed_events_single">"(<xliff:g id="REMINDER_COUNT">%s</xliff:g> 件の通知がありました)"</string>
<string name="edit_event_from_label">"開始"</string>
<string name="edit_event_all_day_label">"終日"</string>
<string name="edit_event_calendar_label">"カレンダー"</string>
- <string name="edit_event_show_extra_options">"追å\8a ã\81®ã\82ªã\83\97ã\82·ã\83§ã\83³を表示する"</string>
- <string name="edit_event_hide_extra_options">"追å\8a ã\81®ã\82ªã\83\97ã\82·ã\83§ã\83³を表示しない"</string>
- <string name="description_label">"説明"</string>
+ <string name="edit_event_show_extra_options">"詳細é \85ç\9b®を表示する"</string>
+ <string name="edit_event_hide_extra_options">"詳細é \85ç\9b®を表示しない"</string>
+ <string name="description_label">"内容"</string>
<string name="presence_label">"ステータス"</string>
- <string name="privacy_label">"プライバシー"</string>
+ <string name="privacy_label">"公開設定"</string>
<string name="reminders_label">"通知"</string>
<string name="no_syncable_calendars">"カレンダーがありません"</string>
<string name="no_calendars_found">"カレンダーがありません。"</string>
<string name="discard_label">"変更取消"</string>
<string name="import_label">"インポート"</string>
<string name="snooze_all_label">"すべてスヌーズ"</string>
- <string name="dismiss_all_label">"すべて表示しない"</string>
- <string name="does_not_repeat">"一度だけの予定"</string>
+ <string name="dismiss_all_label">"通知を消去"</string>
+ <string name="does_not_repeat">"繰り返しなし"</string>
<string name="daily">"毎日"</string>
<string name="every_weekday">"平日(月~金)"</string>
<string name="weekly">"毎週(<xliff:g id="DAYS_OF_WEEK">%s</xliff:g>)"</string>
<string name="monthly_on_day_count">"毎月(<xliff:g id="ORDINAL_NUMBER">%1$s</xliff:g> <xliff:g id="DAY_OF_WEEK">%2$s</xliff:g>)"</string>
<string name="monthly_on_day">"毎月(<xliff:g id="DAY_OF_MONTH">%s</xliff:g>日)"</string>
<string name="yearly">"毎年(<xliff:g id="DATES">%s</xliff:g>)"</string>
- <string name="custom">"カスタム…(携帯端末ではカスタマイズ不可)"</string>
- <string name="modify_event">"この予定のみを変更します。"</string>
- <string name="modify_all">"一連の定期的な予定すべてを削除します。"</string>
- <string name="modify_all_following">"ã\81\93ã\82\8c以é\99\8dã\81®äº\88å®\9aã\81\99ã\81¹ã\81¦ã\82\92å\89\8aé\99¤ã\81\97ã\81¾ã\81\99ã\80\82"</string>
+ <string name="custom">"編集 (携帯端末ではカスタマイズ不可)"</string>
+ <string name="modify_event">"この日だけ変更"</string>
+ <string name="modify_all">"繰り返す予定すべて変更"</string>
+ <string name="modify_all_following">"ã\81\93ã\82\8c以é\99\8dã\81\99ã\81¹ã\81¦å¤\89æ\9b´"</string>
<string name="delete_this_event_title">"この予定を削除します。"</string>
<string name="delete_title">"削除"</string>
- <string name="change_response_title">"返答を変更"</string>
+ <string name="change_response_title">"出欠状況を変更"</string>
<string name="preferences_title">"設定"</string>
- <string name="preferences_general_title">"カレンダーの表示の設定"</string>
- <string name="preferences_alerts_title">"通知の設定"</string>
+ <string name="preferences_general_title">"カレンダーの表示設定"</string>
+ <string name="preferences_alerts_title">"通知設定"</string>
<string name="preferences_hide_declined_title">"辞退した予定を非表示"</string>
- <string name="preferences_alerts_type_title">"アラートと通知を設定"</string>
- <string name="preferences_alerts_type_dialog">"アラートと通知"</string>
+ <string name="preferences_alerts_type_title">"通知方法"</string>
+ <string name="preferences_alerts_type_dialog">"通知方法"</string>
<string name="preferences_alerts_vibrate_title">"バイブレーション"</string>
<string name="preferences_alerts_ringtone_title">"着信音を選択"</string>
<string name="preferences_default_reminder_title">"通知設定"</string>
- <string name="preferences_default_reminder_dialog">"ã\83\87ã\83\95ã\82©ã\83«ã\83\88ã\81®é\80\9aç\9f¥æ\99\82é\96\93"</string>
+ <string name="preferences_default_reminder_dialog">"ã\83ªã\83\9eã\82¤ã\83³ã\83\80ã\83¼é\80\9aç\9f¥"</string>
<string name="preferences_default_reminder_default">"10"</string>
</resources>
<string name="saving_event">"일정 저장 중..."</string>
<string name="loading_calendars_title">"캘린더 로드 중"</string>
<string name="loading_calendars_message">"캘린더 로드 중..."</string>
+ <string name="alert_title">"캘린더 알림"</string>
<string name="alert_when_label">"일자:"</string>
<string name="alert_where_label">"위치:"</string>
<string name="alert_missed_events_single">"(<xliff:g id="REMINDER_COUNT">%s</xliff:g>개 이상의 알림)"</string>
<string name="saving_event">"Lagrer hendelse…"</string>
<string name="loading_calendars_title">"Laster kalendre"</string>
<string name="loading_calendars_message">"Laster kalendre…"</string>
+ <string name="alert_title">"Kalendervarslinger"</string>
<string name="alert_when_label">"Hva:"</string>
<string name="alert_where_label">"Hvor:"</string>
- <!-- no translation found for alert_missed_events_single (8042891195314876684) -->
- <skip />
+ <string name="alert_missed_events_single">"(<xliff:g id="REMINDER_COUNT">%s</xliff:g> hendelse til)"</string>
<string name="alert_missed_events_multiple">"(<xliff:g id="REMINDER_COUNT">%s</xliff:g> hendelser til)"</string>
<string name="event_info_title">"Vis hendelse"</string>
<string name="event_info_title_invite">"Møteinvitasjon"</string>
<string name="saving_event">"Afspraak wordt opgeslagen..."</string>
<string name="loading_calendars_title">"Agenda\'s worden geladen"</string>
<string name="loading_calendars_message">"Agenda\'s worden geladen"</string>
+ <string name="alert_title">"Agenda-herinneringen"</string>
<string name="alert_when_label">"Wanneer:"</string>
<string name="alert_where_label">"Waar:"</string>
<string name="alert_missed_events_single">"(<xliff:g id="REMINDER_COUNT">%s</xliff:g> extra herinnering)"</string>
<string name="saving_event">"Zapisywanie wydarzenia..."</string>
<string name="loading_calendars_title">"Ładowanie kalendarzy"</string>
<string name="loading_calendars_message">"Ładowanie kalendarzy..."</string>
+ <string name="alert_title">"Powiadomienia kalendarza"</string>
<string name="alert_when_label">"Kiedy:"</string>
<string name="alert_where_label">"Gdzie:"</string>
<string name="alert_missed_events_single">"(więcej przypomnień: <xliff:g id="REMINDER_COUNT">%s</xliff:g>)"</string>
<string name="saving_event">"Идет сохранение мероприятия..."</string>
<string name="loading_calendars_title">"Загрузка календарей"</string>
<string name="loading_calendars_message">"Идет загрузка календарей..."</string>
+ <string name="alert_title">"Уведомления Календаря"</string>
<string name="alert_when_label">"Когда:"</string>
<string name="alert_where_label">"Где:"</string>
<string name="alert_missed_events_single">"(дополнительное уведомление: <xliff:g id="REMINDER_COUNT">%s</xliff:g>)"</string>
<string name="saving_event">"正在保存活动..."</string>
<string name="loading_calendars_title">"载入日历"</string>
<string name="loading_calendars_message">"正在载入日历..."</string>
+ <string name="alert_title">"日历通知"</string>
<string name="alert_when_label">"时间:"</string>
<string name="alert_where_label">"地点:"</string>
<string name="alert_missed_events_single">"(还有 <xliff:g id="REMINDER_COUNT">%s</xliff:g> 个提醒)"</string>
<string name="saving_event">"正在儲存活動..."</string>
<string name="loading_calendars_title">"正在載入日曆"</string>
<string name="loading_calendars_message">"正在載入日曆..."</string>
+ <string name="alert_title">"日曆通知"</string>
<string name="alert_when_label">"時間:"</string>
<string name="alert_where_label">"地點:"</string>
<string name="alert_missed_events_single">"(還有 <xliff:g id="REMINDER_COUNT">%s</xliff:g> 則提醒)"</string>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Order of weekday/day label in week view -->
+ <string name="weekday_day">%1$s %2$s</string>
+</resources>
<item name="android:windowBackground">@null</item>
</style>
+ <style name="MinusButton">
+ <item name="android:background">@drawable/btn_circle</item>
+ <item name="android:src">@drawable/ic_btn_round_minus</item>
+ </style>
+
+ <style name="PlusButton">
+ <item name="android:background">@drawable/btn_circle</item>
+ <item name="android:src">@drawable/ic_btn_round_plus</item>
+ </style>
+
<style name="MonthView_DayLabel">
<item name="android:layout_width">29dip</item>
<item name="android:layout_height">fill_parent</item>
</style>
<style name="TextAppearance.EditEvent_Label">
- <item name="android:textSize">14sp</item>
+ <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textStyle">bold</item>
+ <item name="android:paddingLeft">2dip</item>
+ </style>
+
+ <style name="EditEvent_Layout">
+ <item name="android:paddingLeft">6dip</item>
+ <item name="android:paddingRight">7dip</item>
+ <item name="android:paddingTop">8dip</item>
</style>
<style name="TextAppearance.Alert_Title">
<item name="android:textColor">@android:color/white</item>
</style>
+ <style name="CalendarTheme" parent="android:Theme.Light.NoTitleBar">
+ <item name="android:windowContentOverlay">@null</item>
+ </style>
+
</resources>
selectTime();
} else {
mTime = time;
+ renewCursor();
}
}
// This intent might be a BOOT_COMPLETED so it might not have a Uri.
if (uri != null) {
i.putExtra("uri", uri.toString());
-
- // Record the received time in the CalendarAlerts table.
- // This is useful for finding bugs that cause alarms to be
- // missed or delayed.
- ContentResolver cr = context.getContentResolver();
- ContentValues values = new ContentValues();
- long currentTime = System.currentTimeMillis();
- values.put(CalendarAlerts.RECEIVED_TIME, currentTime);
- cr.update(uri, values, null /* where */, null /* args */);
}
beginStartingService(context, i);
}
import android.provider.Calendar.Reminders;
import android.text.TextUtils;
import android.text.format.DateUtils;
-import android.text.format.Time;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
Reminders._ID, // 0
};
- private void processMessage(Message msg) {
+ @SuppressWarnings("deprecation")
+ void processMessage(Message msg) {
Bundle bundle = (Bundle) msg.obj;
// On reboot, update the notification bar with the contents of the
Log.d(TAG, "uri: " + alertUri);
}
+ if (alertUri != null) {
+ // Record the received time in the CalendarAlerts table.
+ // This is useful for finding bugs that cause alarms to be
+ // missed or delayed.
+ ContentValues values = new ContentValues();
+ values.put(CalendarAlerts.RECEIVED_TIME, System.currentTimeMillis());
+ getContentResolver().update(alertUri, values, null /* where */, null /* args */);
+ }
+
ContentResolver cr = getContentResolver();
Cursor alertCursor = cr.query(alertUri, ALERT_PROJECTION,
null /* selection */, null, null /* sort order */);
- long alertId, eventId, instanceId, alarmTime;
+ long alertId, eventId, alarmTime;
int minutes;
String eventName;
String location;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.Canvas;
+import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PorterDuff;
private Rect mSrcRect = new Rect();
private Rect mDestRect = new Rect();
private Paint mPaint = new Paint();
+ private Paint mPaintBorder = new Paint();
private Paint mEventTextPaint = new Paint();
private Paint mSelectionPaint = new Paint();
private Path mPath = new Path();
p = mPaint;
p.setAntiAlias(true);
+ mPaintBorder.setColor(0xffc8c8c8);
+ mPaintBorder.setStyle(Style.STROKE);
+ mPaintBorder.setAntiAlias(true);
+ mPaintBorder.setStrokeWidth(2.0f);
+
// Allocate space for 2 weeks worth of weekday names so that we can
// easily start the week display at any week day.
mDayStrs = new String[14];
dateNum -= mMonthLength;
}
+ String dateNumStr;
// Add a leading zero if the date is a single digit
if (dateNum < 10) {
- dateStr += " 0" + dateNum;
+ dateNumStr = "0" + dateNum;
} else {
- dateStr += " " + dateNum;
+ dateNumStr = String.valueOf(dateNum);
}
+ dateStr = getResources().getString(R.string.weekday_day,
+ dateStr, dateNumStr);
+
float y = mBannerPlusMargin - 7;
canvas.drawText(dateStr, xCenter, y, p);
}
rf.right = event.right - 1;
canvas.drawRoundRect(rf, SMALL_ROUND_RADIUS, SMALL_ROUND_RADIUS, p);
-
+
+ // Draw a darker border
+ float[] hsv = new float[3];
+ Color.colorToHSV(p.getColor(), hsv);
+ hsv[1] = 1.0f;
+ hsv[2] *= 0.75f;
+ mPaintBorder.setColor(Color.HSVToColor(hsv));
+ canvas.drawRoundRect(rf, SMALL_ROUND_RADIUS, SMALL_ROUND_RADIUS, mPaintBorder);
+
rf.left += 2;
rf.right -= 2;
package com.android.calendar;
-import android.app.Service;
+import android.app.IntentService;
import android.content.ContentResolver;
import android.content.Intent;
import android.database.Cursor;
import android.provider.Calendar.CalendarAlerts;
/**
- * Service for marking all fired alarms as dismissed.
+ * Service for asynchronously marking all fired alarms as dismissed.
*/
-public class DismissAllAlarmsService extends Service {
+public class DismissAllAlarmsService extends IntentService {
private static final String[] PROJECTION = new String[] {
CalendarAlerts._ID,
CalendarAlerts.STATE,
};
private static final int COLUMN_INDEX_STATE = 1;
+ public DismissAllAlarmsService() {
+ super("DismissAllAlarmsService");
+ }
+
@Override
public IBinder onBind(Intent intent) {
return null;
@SuppressWarnings("deprecation")
@Override
- public void onStart(Intent intent, int startId) {
+ public void onHandleIntent(Intent intent) {
// Mark all fired alarms as dismissed
Uri uri = CalendarAlerts.CONTENT_URI_BY_INSTANCE;
String selection = CalendarAlerts.STATE + "=" + CalendarAlerts.FIRED;
import static android.provider.Calendar.EVENT_BEGIN_TIME;
import static android.provider.Calendar.EVENT_END_TIME;
-
import android.app.Activity;
import android.app.AlertDialog;
import android.app.DatePickerDialog;
mAvailabilitySpinner = (Spinner) findViewById(R.id.availability);
mVisibilitySpinner = (Spinner) findViewById(R.id.visibility);
mRemindersSeparator = findViewById(R.id.reminders_separator);
- mRemindersContainer = (LinearLayout) findViewById(R.id.reminders_container);
+ mRemindersContainer = (LinearLayout) findViewById(R.id.reminder_items_container);
mExtraOptions = (LinearLayout) findViewById(R.id.extra_options_container);
mAllDayCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
}
updateRemindersVisibility();
+ // Setup the + Add Reminder Button
+ View.OnClickListener addReminderOnClickListener = new View.OnClickListener() {
+ public void onClick(View v) {
+ addReminder();
+ }
+ };
+ ImageButton reminderRemoveButton = (ImageButton) findViewById(R.id.reminder_add);
+ reminderRemoveButton.setOnClickListener(addReminderOnClickListener);
+
mDeleteEventHelper = new DeleteEventHelper(this, true /* exit when done */);
if (mEventCursor == null) {
// This is an existing event so hide the calendar spinner
// since we can't change the calendar.
- View calendarSeparator = findViewById(R.id.calendar_separator);
- View calendarLabel = findViewById(R.id.calendar_label);
- calendarSeparator.setVisibility(View.GONE);
- calendarLabel.setVisibility(View.GONE);
- mCalendarsSpinner.setVisibility(View.GONE);
+ View calendarGroup = findViewById(R.id.calendar_group);
+ calendarGroup.setVisibility(View.GONE);
} else if (Time.isEpoch(mStartTime) && Time.isEpoch(mEndTime)) {
mStartTime.setToNow();
return super.onPrepareOptionsMenu(menu);
}
+ private void addReminder() {
+ // TODO: when adding a new reminder, make it different from the
+ // last one in the list (if any).
+ if (mDefaultReminderMinutes == 0) {
+ addReminder(this, this, mReminderItems, mReminderValues,
+ mReminderLabels, 10 /* minutes */);
+ } else {
+ addReminder(this, this, mReminderItems, mReminderValues,
+ mReminderLabels, mDefaultReminderMinutes);
+ }
+ updateRemindersVisibility();
+ }
+
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case MENU_ADD_REMINDER:
- // TODO: when adding a new reminder, make it different from the
- // last one in the list (if any).
- if (mDefaultReminderMinutes == 0) {
- addReminder(this, this, mReminderItems, mReminderValues,
- mReminderLabels, 10 /* minutes */);
- } else {
- addReminder(this, this, mReminderItems, mReminderValues,
- mReminderLabels, mDefaultReminderMinutes);
- }
- updateRemindersVisibility();
+ addReminder();
return true;
case MENU_SHOW_EXTRA_OPTIONS:
mExtraOptions.setVisibility(View.VISIBLE);
import static android.provider.Calendar.EVENT_BEGIN_TIME;
import static android.provider.Calendar.EVENT_END_TIME;
-
import android.app.Activity;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
-import android.widget.ImageView;
+import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.TextView;
prefs.getString(CalendarPreferenceActivity.KEY_DEFAULT_REMINDER, "0");
mDefaultReminderMinutes = Integer.parseInt(durationString);
- mRemindersContainer = (LinearLayout) findViewById(R.id.reminders_container);
+ mRemindersContainer = (LinearLayout) findViewById(R.id.reminder_items_container);
// Reminders cursor
boolean hasAlarm = mEventCursor.getInt(EVENT_INDEX_HAS_ALARM) != 0;
updateView();
updateRemindersVisibility();
+ // Setup the + Add Reminder Button
+ View.OnClickListener addReminderOnClickListener = new View.OnClickListener() {
+ public void onClick(View v) {
+ addReminder();
+ }
+ };
+ ImageButton reminderRemoveButton = (ImageButton) findViewById(R.id.reminder_add);
+ reminderRemoveButton.setOnClickListener(addReminderOnClickListener);
+
mDeleteEventHelper = new DeleteEventHelper(this, true /* exit when done */);
mEditResponseHelper = new EditResponseHelper(this);
}
return super.onPrepareOptionsMenu(menu);
}
+
+ private void addReminder() {
+ // TODO: when adding a new reminder, make it different from the
+ // last one in the list (if any).
+ if (mDefaultReminderMinutes == 0) {
+ EditEvent.addReminder(this, this, mReminderItems,
+ mReminderValues, mReminderLabels, 10 /* minutes */);
+ } else {
+ EditEvent.addReminder(this, this, mReminderItems,
+ mReminderValues, mReminderLabels, mDefaultReminderMinutes);
+ }
+ updateRemindersVisibility();
+ }
@Override
public boolean onOptionsItemSelected(MenuItem item) {
super.onOptionsItemSelected(item);
switch (item.getItemId()) {
case MENU_ADD_REMINDER:
- // TODO: when adding a new reminder, make it different from the
- // last one in the list (if any).
- if (mDefaultReminderMinutes == 0) {
- EditEvent.addReminder(this, this, mReminderItems,
- mReminderValues, mReminderLabels, 10 /* minutes */);
- } else {
- EditEvent.addReminder(this, this, mReminderItems,
- mReminderValues, mReminderLabels, mDefaultReminderMinutes);
- }
- updateRemindersVisibility();
+ addReminder();
break;
case MENU_EDIT:
doEdit();
String eventTimezone = mEventCursor.getString(EVENT_INDEX_EVENT_TIMEZONE);
int color = mEventCursor.getInt(EVENT_INDEX_COLOR) & 0xbbffffff;
- View strip = (View) findViewById(R.id.strip);
- strip.getBackground().setColorFilter(color, PorterDuff.Mode.SRC_IN);
+ View calBackground = findViewById(R.id.cal_background);
+ calBackground.setBackgroundColor(color);
TextView title = (TextView) findViewById(R.id.title);
title.setTextColor(color);