</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>
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"
android:layout_height="wrap_content"
+ android:paddingTop="15dip"
+ android:paddingBottom="15dip"
+ style="?android:attr/textAppearanceMedium"
android:text="@string/edit_event_all_day_label"/>
</LinearLayout>
<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>
<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">
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);