auto import from //branches/cupcake_rel/...@141571
The Android Open Source Project [Fri, 20 Mar 2009 06:08:56 +0000 (23:08 -0700)]
20 files changed:
AndroidManifest.xml
res/drawable-finger/btn_circle.xml [new file with mode: 0644]
res/drawable-finger/btn_circle_disable.png [new file with mode: 0644]
res/drawable-finger/btn_circle_disable_focused.png [new file with mode: 0644]
res/drawable-finger/btn_circle_longpress.png [new file with mode: 0644]
res/drawable-finger/btn_circle_normal.png [new file with mode: 0644]
res/drawable-finger/btn_circle_pressed.png [new file with mode: 0644]
res/drawable-finger/btn_circle_selected.png [new file with mode: 0644]
res/drawable/bg_cal_card.9.png
res/drawable/ic_btn_round_minus.png [new file with mode: 0644]
res/drawable/ic_btn_round_plus.png [new file with mode: 0644]
res/layout/day_activity.xml
res/layout/edit_event.xml
res/layout/edit_reminder_item.xml
res/layout/event_info_activity.xml
res/layout/month_activity.xml
res/layout/week_activity.xml
res/values/styles.xml
src/com/android/calendar/EditEvent.java
src/com/android/calendar/EventInfoActivity.java

index aa4418b..c2da2da 100644 (file)
         </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" />
@@ -67,7 +67,7 @@
         </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>
diff --git a/res/drawable-finger/btn_circle.xml b/res/drawable-finger/btn_circle.xml
new file mode 100644 (file)
index 0000000..9208010
--- /dev/null
@@ -0,0 +1,32 @@
+<?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>
diff --git a/res/drawable-finger/btn_circle_disable.png b/res/drawable-finger/btn_circle_disable.png
new file mode 100644 (file)
index 0000000..33b74a6
Binary files /dev/null and b/res/drawable-finger/btn_circle_disable.png differ
diff --git a/res/drawable-finger/btn_circle_disable_focused.png b/res/drawable-finger/btn_circle_disable_focused.png
new file mode 100644 (file)
index 0000000..005ad8d
Binary files /dev/null and b/res/drawable-finger/btn_circle_disable_focused.png differ
diff --git a/res/drawable-finger/btn_circle_longpress.png b/res/drawable-finger/btn_circle_longpress.png
new file mode 100644 (file)
index 0000000..f27d411
Binary files /dev/null and b/res/drawable-finger/btn_circle_longpress.png differ
diff --git a/res/drawable-finger/btn_circle_normal.png b/res/drawable-finger/btn_circle_normal.png
new file mode 100644 (file)
index 0000000..fc5af1c
Binary files /dev/null and b/res/drawable-finger/btn_circle_normal.png differ
diff --git a/res/drawable-finger/btn_circle_pressed.png b/res/drawable-finger/btn_circle_pressed.png
new file mode 100644 (file)
index 0000000..8f40afd
Binary files /dev/null and b/res/drawable-finger/btn_circle_pressed.png differ
diff --git a/res/drawable-finger/btn_circle_selected.png b/res/drawable-finger/btn_circle_selected.png
new file mode 100644 (file)
index 0000000..c74fac2
Binary files /dev/null and b/res/drawable-finger/btn_circle_selected.png differ
index af7ec44..ca1268f 100644 (file)
Binary files a/res/drawable/bg_cal_card.9.png and b/res/drawable/bg_cal_card.9.png differ
diff --git a/res/drawable/ic_btn_round_minus.png b/res/drawable/ic_btn_round_minus.png
new file mode 100644 (file)
index 0000000..96dbb17
Binary files /dev/null and b/res/drawable/ic_btn_round_minus.png differ
diff --git a/res/drawable/ic_btn_round_plus.png b/res/drawable/ic_btn_round_plus.png
new file mode 100644 (file)
index 0000000..1ec8a95
Binary files /dev/null and b/res/drawable/ic_btn_round_plus.png differ
index 93b3ce1..2a73a3c 100644 (file)
             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>
index 68f2001..eb5886e 100644 (file)
@@ -4,9 +4,9 @@
      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"
index 160eb8a..18e45e6 100644 (file)
     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"
index a6fbe2d..3a85ac9 100644 (file)
     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>
index fe9c651..8dc1fb0 100644 (file)
         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>
index 93b3ce1..2a73a3c 100644 (file)
             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>
index bcc04c2..4471ad2 100644 (file)
         <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">
@@ -68,4 +86,8 @@
         <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>
index 6497aad..848ff6e 100644 (file)
@@ -18,7 +18,6 @@ package com.android.calendar;
 
 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;
@@ -582,7 +581,7 @@ public class EditEvent extends Activity implements View.OnClickListener,
         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() {
@@ -680,6 +679,15 @@ public class EditEvent extends Activity implements View.OnClickListener,
         }
         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) {
@@ -809,11 +817,8 @@ public class EditEvent extends Activity implements View.OnClickListener,
 
             // 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();
 
@@ -884,20 +889,24 @@ public class EditEvent extends Activity implements View.OnClickListener,
         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);
index 0b31b01..cfb6004 100644 (file)
@@ -18,7 +18,6 @@ package com.android.calendar;
 
 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;
@@ -47,7 +46,7 @@ import android.view.MenuItem;
 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;
@@ -257,7 +256,7 @@ public class EventInfoActivity extends Activity implements View.OnClickListener,
                 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;
@@ -289,6 +288,15 @@ public class EventInfoActivity extends Activity implements View.OnClickListener,
         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);
     }
@@ -397,22 +405,26 @@ public class EventInfoActivity extends Activity implements View.OnClickListener,
 
         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();
@@ -584,8 +596,8 @@ public class EventInfoActivity extends Activity implements View.OnClickListener,
         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);