OSDN Git Service

Remove the clock face from the alarm list.
authorPatrick Scott <phanna@android.com>
Mon, 19 Oct 2009 12:52:35 +0000 (08:52 -0400)
committerPatrick Scott <phanna@android.com>
Mon, 19 Oct 2009 13:45:17 +0000 (09:45 -0400)
Remove all the clock layouts except the digital. Remove the clock picker and any
settings related to change the clock face.

Next step: Move the settings and add alarm menu items to buttons.

51 files changed:
AndroidManifest.xml
res/drawable-hdpi/circle0.png [deleted file]
res/drawable-hdpi/circle1.png [deleted file]
res/drawable-hdpi/circle2.png [deleted file]
res/drawable-hdpi/circle3.png [deleted file]
res/drawable-hdpi/clock_dial.png [deleted file]
res/drawable-hdpi/clock_hour.png [deleted file]
res/drawable-hdpi/clock_minute.png [deleted file]
res/drawable-hdpi/clockdroid2_dial.png [deleted file]
res/drawable-hdpi/clockdroid2_hour.png [deleted file]
res/drawable-hdpi/clockdroid2_minute.png [deleted file]
res/drawable-hdpi/clockdroids_dial.png [deleted file]
res/drawable-hdpi/clockdroids_hour.png [deleted file]
res/drawable-hdpi/clockdroids_minute.png [deleted file]
res/drawable-hdpi/clockgoog_dial.png [deleted file]
res/drawable-hdpi/clockgoog_hour.png [deleted file]
res/drawable-hdpi/clockgoog_minute.png [deleted file]
res/drawable-mdpi/circle0.png [deleted file]
res/drawable-mdpi/circle1.png [deleted file]
res/drawable-mdpi/circle2.png [deleted file]
res/drawable-mdpi/circle3.png [deleted file]
res/drawable-mdpi/clock_dial.png [deleted file]
res/drawable-mdpi/clock_hour.png [deleted file]
res/drawable-mdpi/clock_minute.png [deleted file]
res/drawable-mdpi/clockdroid2_dial.png [deleted file]
res/drawable-mdpi/clockdroid2_hour.png [deleted file]
res/drawable-mdpi/clockdroid2_minute.png [deleted file]
res/drawable-mdpi/clockdroids_dial.png [deleted file]
res/drawable-mdpi/clockdroids_hour.png [deleted file]
res/drawable-mdpi/clockdroids_minute.png [deleted file]
res/drawable-mdpi/clockgoog_dial.png [deleted file]
res/drawable-mdpi/clockgoog_hour.png [deleted file]
res/drawable-mdpi/clockgoog_minute.png [deleted file]
res/drawable/animate_circle.xml [deleted file]
res/drawable/circle0_drawable.xml [deleted file]
res/drawable/circle1_drawable.xml [deleted file]
res/drawable/circle2_drawable.xml [deleted file]
res/drawable/circle3_drawable.xml [deleted file]
res/layout-land/alarm_clock.xml [deleted file]
res/layout/alarm_alert.xml
res/layout/alarm_clock.xml
res/layout/clock_basic_bw.xml [deleted file]
res/layout/clock_droid2.xml [deleted file]
res/layout/clock_droids.xml [deleted file]
res/layout/clock_googly.xml [deleted file]
res/layout/clockpicker.xml [deleted file]
res/menu/main_menu.xml
src/com/android/deskclock/AlarmAlert.java
src/com/android/deskclock/AlarmClock.java
src/com/android/deskclock/ClockPicker.java [deleted file]
src/com/android/deskclock/DigitalClock.java

index 95824e4..9ec9d5a 100644 (file)
@@ -50,8 +50,6 @@
                 android:taskAffinity=""
                 android:configChanges="orientation|keyboardHidden|keyboard|navigation"/>
 
-        <activity android:name="ClockPicker" />
-
         <receiver android:name="AlarmReceiver">
             <intent-filter>
                <action android:name="com.android.deskclock.ALARM_ALERT" />
diff --git a/res/drawable-hdpi/circle0.png b/res/drawable-hdpi/circle0.png
deleted file mode 100644 (file)
index 95b199e..0000000
Binary files a/res/drawable-hdpi/circle0.png and /dev/null differ
diff --git a/res/drawable-hdpi/circle1.png b/res/drawable-hdpi/circle1.png
deleted file mode 100644 (file)
index 2312efb..0000000
Binary files a/res/drawable-hdpi/circle1.png and /dev/null differ
diff --git a/res/drawable-hdpi/circle2.png b/res/drawable-hdpi/circle2.png
deleted file mode 100644 (file)
index 0e3e8ce..0000000
Binary files a/res/drawable-hdpi/circle2.png and /dev/null differ
diff --git a/res/drawable-hdpi/circle3.png b/res/drawable-hdpi/circle3.png
deleted file mode 100644 (file)
index 809d614..0000000
Binary files a/res/drawable-hdpi/circle3.png and /dev/null differ
diff --git a/res/drawable-hdpi/clock_dial.png b/res/drawable-hdpi/clock_dial.png
deleted file mode 100644 (file)
index f175a5b..0000000
Binary files a/res/drawable-hdpi/clock_dial.png and /dev/null differ
diff --git a/res/drawable-hdpi/clock_hour.png b/res/drawable-hdpi/clock_hour.png
deleted file mode 100644 (file)
index 65076c3..0000000
Binary files a/res/drawable-hdpi/clock_hour.png and /dev/null differ
diff --git a/res/drawable-hdpi/clock_minute.png b/res/drawable-hdpi/clock_minute.png
deleted file mode 100644 (file)
index 95c0ffc..0000000
Binary files a/res/drawable-hdpi/clock_minute.png and /dev/null differ
diff --git a/res/drawable-hdpi/clockdroid2_dial.png b/res/drawable-hdpi/clockdroid2_dial.png
deleted file mode 100644 (file)
index 8efc022..0000000
Binary files a/res/drawable-hdpi/clockdroid2_dial.png and /dev/null differ
diff --git a/res/drawable-hdpi/clockdroid2_hour.png b/res/drawable-hdpi/clockdroid2_hour.png
deleted file mode 100644 (file)
index af381bb..0000000
Binary files a/res/drawable-hdpi/clockdroid2_hour.png and /dev/null differ
diff --git a/res/drawable-hdpi/clockdroid2_minute.png b/res/drawable-hdpi/clockdroid2_minute.png
deleted file mode 100644 (file)
index 554a393..0000000
Binary files a/res/drawable-hdpi/clockdroid2_minute.png and /dev/null differ
diff --git a/res/drawable-hdpi/clockdroids_dial.png b/res/drawable-hdpi/clockdroids_dial.png
deleted file mode 100644 (file)
index 0db5af5..0000000
Binary files a/res/drawable-hdpi/clockdroids_dial.png and /dev/null differ
diff --git a/res/drawable-hdpi/clockdroids_hour.png b/res/drawable-hdpi/clockdroids_hour.png
deleted file mode 100644 (file)
index 27b2cbf..0000000
Binary files a/res/drawable-hdpi/clockdroids_hour.png and /dev/null differ
diff --git a/res/drawable-hdpi/clockdroids_minute.png b/res/drawable-hdpi/clockdroids_minute.png
deleted file mode 100644 (file)
index c4acc0d..0000000
Binary files a/res/drawable-hdpi/clockdroids_minute.png and /dev/null differ
diff --git a/res/drawable-hdpi/clockgoog_dial.png b/res/drawable-hdpi/clockgoog_dial.png
deleted file mode 100644 (file)
index 2d2140e..0000000
Binary files a/res/drawable-hdpi/clockgoog_dial.png and /dev/null differ
diff --git a/res/drawable-hdpi/clockgoog_hour.png b/res/drawable-hdpi/clockgoog_hour.png
deleted file mode 100644 (file)
index c6af09f..0000000
Binary files a/res/drawable-hdpi/clockgoog_hour.png and /dev/null differ
diff --git a/res/drawable-hdpi/clockgoog_minute.png b/res/drawable-hdpi/clockgoog_minute.png
deleted file mode 100644 (file)
index b04f3e5..0000000
Binary files a/res/drawable-hdpi/clockgoog_minute.png and /dev/null differ
diff --git a/res/drawable-mdpi/circle0.png b/res/drawable-mdpi/circle0.png
deleted file mode 100644 (file)
index 1386ed4..0000000
Binary files a/res/drawable-mdpi/circle0.png and /dev/null differ
diff --git a/res/drawable-mdpi/circle1.png b/res/drawable-mdpi/circle1.png
deleted file mode 100644 (file)
index fed0190..0000000
Binary files a/res/drawable-mdpi/circle1.png and /dev/null differ
diff --git a/res/drawable-mdpi/circle2.png b/res/drawable-mdpi/circle2.png
deleted file mode 100644 (file)
index 9712976..0000000
Binary files a/res/drawable-mdpi/circle2.png and /dev/null differ
diff --git a/res/drawable-mdpi/circle3.png b/res/drawable-mdpi/circle3.png
deleted file mode 100644 (file)
index 056bb45..0000000
Binary files a/res/drawable-mdpi/circle3.png and /dev/null differ
diff --git a/res/drawable-mdpi/clock_dial.png b/res/drawable-mdpi/clock_dial.png
deleted file mode 100644 (file)
index 734e361..0000000
Binary files a/res/drawable-mdpi/clock_dial.png and /dev/null differ
diff --git a/res/drawable-mdpi/clock_hour.png b/res/drawable-mdpi/clock_hour.png
deleted file mode 100644 (file)
index 023faa4..0000000
Binary files a/res/drawable-mdpi/clock_hour.png and /dev/null differ
diff --git a/res/drawable-mdpi/clock_minute.png b/res/drawable-mdpi/clock_minute.png
deleted file mode 100644 (file)
index 104e2a2..0000000
Binary files a/res/drawable-mdpi/clock_minute.png and /dev/null differ
diff --git a/res/drawable-mdpi/clockdroid2_dial.png b/res/drawable-mdpi/clockdroid2_dial.png
deleted file mode 100644 (file)
index 0996f09..0000000
Binary files a/res/drawable-mdpi/clockdroid2_dial.png and /dev/null differ
diff --git a/res/drawable-mdpi/clockdroid2_hour.png b/res/drawable-mdpi/clockdroid2_hour.png
deleted file mode 100644 (file)
index cf6268d..0000000
Binary files a/res/drawable-mdpi/clockdroid2_hour.png and /dev/null differ
diff --git a/res/drawable-mdpi/clockdroid2_minute.png b/res/drawable-mdpi/clockdroid2_minute.png
deleted file mode 100644 (file)
index a4fe782..0000000
Binary files a/res/drawable-mdpi/clockdroid2_minute.png and /dev/null differ
diff --git a/res/drawable-mdpi/clockdroids_dial.png b/res/drawable-mdpi/clockdroids_dial.png
deleted file mode 100644 (file)
index 45e86d0..0000000
Binary files a/res/drawable-mdpi/clockdroids_dial.png and /dev/null differ
diff --git a/res/drawable-mdpi/clockdroids_hour.png b/res/drawable-mdpi/clockdroids_hour.png
deleted file mode 100644 (file)
index 898d44d..0000000
Binary files a/res/drawable-mdpi/clockdroids_hour.png and /dev/null differ
diff --git a/res/drawable-mdpi/clockdroids_minute.png b/res/drawable-mdpi/clockdroids_minute.png
deleted file mode 100644 (file)
index 4e59764..0000000
Binary files a/res/drawable-mdpi/clockdroids_minute.png and /dev/null differ
diff --git a/res/drawable-mdpi/clockgoog_dial.png b/res/drawable-mdpi/clockgoog_dial.png
deleted file mode 100644 (file)
index a83b7b8..0000000
Binary files a/res/drawable-mdpi/clockgoog_dial.png and /dev/null differ
diff --git a/res/drawable-mdpi/clockgoog_hour.png b/res/drawable-mdpi/clockgoog_hour.png
deleted file mode 100644 (file)
index 7eff3c2..0000000
Binary files a/res/drawable-mdpi/clockgoog_hour.png and /dev/null differ
diff --git a/res/drawable-mdpi/clockgoog_minute.png b/res/drawable-mdpi/clockgoog_minute.png
deleted file mode 100644 (file)
index b1eaebd..0000000
Binary files a/res/drawable-mdpi/clockgoog_minute.png and /dev/null differ
diff --git a/res/drawable/animate_circle.xml b/res/drawable/animate_circle.xml
deleted file mode 100644 (file)
index a07b8cf..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 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.
--->
-
-<!--  Chewie... the hyperdrive ain't working -->
-<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
-    android:oneshot="false" android:visible="true">
-    <item android:drawable="@drawable/circle0_drawable" android:duration="80" />
-    <item android:drawable="@drawable/circle1_drawable" android:duration="80" />
-    <item android:drawable="@drawable/circle2_drawable" android:duration="80" />
-    <item android:drawable="@drawable/circle3_drawable" android:duration="80" />
-</animation-list>
-
-
-
diff --git a/res/drawable/circle0_drawable.xml b/res/drawable/circle0_drawable.xml
deleted file mode 100644 (file)
index 0137d4a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?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.
--->
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-    android:oneshot="false" android:src="@drawable/circle0"
-    android:gravity="center"/>
diff --git a/res/drawable/circle1_drawable.xml b/res/drawable/circle1_drawable.xml
deleted file mode 100644 (file)
index 1272c4b..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?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.
--->
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-    android:oneshot="false" android:src="@drawable/circle1"
-    android:gravity="center"/>
diff --git a/res/drawable/circle2_drawable.xml b/res/drawable/circle2_drawable.xml
deleted file mode 100644 (file)
index d1b492d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?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.
--->
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-    android:oneshot="false" android:src="@drawable/circle2"
-    android:gravity="center"/>
diff --git a/res/drawable/circle3_drawable.xml b/res/drawable/circle3_drawable.xml
deleted file mode 100644 (file)
index 1060a32..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?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.
--->
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-    android:oneshot="false" android:src="@drawable/circle3"
-    android:gravity="center"/>
diff --git a/res/layout-land/alarm_clock.xml b/res/layout-land/alarm_clock.xml
deleted file mode 100644 (file)
index ab50039..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 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.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/base_layout"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    android:gravity="center_vertical"> 
-
-    <FrameLayout
-        android:id="@+id/clock_layout"
-        android:layout_width="208dip"
-        android:layout_height="fill_parent"/>
-
-    <ListView
-        android:id="@+id/alarms_list"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content" />
-
-</LinearLayout>
index 1b5c2c4..e502122 100644 (file)
             android:layout_marginLeft="10dip"
             android:layout_marginRight="10dip"/>
 
-        <LinearLayout
-            android:id="@+id/clockView"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:layout_gravity="fill_vertical|center"/>
+        <include layout="@layout/digital_clock" />
 
         <LinearLayout
             android:layout_width="wrap_content"
index d8a8dc6..8ea4e1f 100644 (file)
     android:id="@+id/base_layout"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
-    android:layout_marginTop="6dip"
     android:orientation="vertical"> 
 
-    <LinearLayout
-        android:id="@+id/clock_layout"
-        android:layout_width="fill_parent"
-        android:layout_height="192dip"/>
-
     <ListView
         android:id="@+id/alarms_list"
         android:layout_width="fill_parent"
diff --git a/res/layout/clock_basic_bw.xml b/res/layout/clock_basic_bw.xml
deleted file mode 100644 (file)
index ba316c1..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 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.
--->
-
-<AnalogClock xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/clock"
-    style="@style/clock"
-    android:dial="@drawable/clock_dial"
-    android:hand_hour="@drawable/clock_hour"
-    android:hand_minute="@drawable/clock_minute"/>
diff --git a/res/layout/clock_droid2.xml b/res/layout/clock_droid2.xml
deleted file mode 100644 (file)
index a2eff4e..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 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.
--->
-
-<AnalogClock xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/clock"
-    style="@style/clock"
-    android:dial="@drawable/clockdroid2_dial"
-    android:hand_hour="@drawable/clockdroid2_hour"
-    android:hand_minute="@drawable/clockdroid2_minute"/>
diff --git a/res/layout/clock_droids.xml b/res/layout/clock_droids.xml
deleted file mode 100644 (file)
index 8676d27..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 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.
--->
-
-<AnalogClock xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/clock"
-    style="@style/clock"
-    android:dial="@drawable/clockdroids_dial"
-    android:hand_hour="@drawable/clockdroids_hour"
-    android:hand_minute="@drawable/clockdroids_minute"/>
diff --git a/res/layout/clock_googly.xml b/res/layout/clock_googly.xml
deleted file mode 100644 (file)
index 63dcd70..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 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.
--->
-
-<AnalogClock xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/clock"
-    style="@style/clock"
-    android:dial="@drawable/clockgoog_dial"
-    android:hand_hour="@drawable/clockgoog_hour"
-    android:hand_minute="@drawable/clockgoog_minute"/>
diff --git a/res/layout/clockpicker.xml b/res/layout/clockpicker.xml
deleted file mode 100644 (file)
index 2e2c3b9..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 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.
--->
-
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
-    android:layout_width="fill_parent" 
-    android:layout_height="fill_parent"> 
-    
-    <TextView
-        android:id="@+id/instructions"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:padding="5dip"
-        android:background="#70000000"
-        android:text="@string/clock_instructions"
-        android:layout_alignParentTop="true"
-        android:layout_centerHorizontal="true"
-    />
-    <LinearLayout
-        android:id="@+id/clock_layout"
-        android:layout_width="fill_parent"
-        android:layout_below="@+id/instructions"
-        android:layout_height="208dip"
-        android:gravity="center"/> 
-    
-    <Gallery android:id="@+id/gallery"
-        android:background="#70000000"
-        android:layout_width="fill_parent"
-        android:layout_height="80dip"
-        android:layout_alignParentBottom="true"
-        android:layout_alignParentLeft="true"
-        android:gravity="center_vertical"
-        android:spacing="16dp"
-    />
-
-</RelativeLayout>
-   
index 5821195..793f21d 100644 (file)
@@ -18,9 +18,6 @@
     <item android:id="@+id/menu_add_alarm"
         android:title="@string/add_alarm"
         android:icon="@android:drawable/ic_menu_add"/>
-    <item android:id="@+id/menu_toggle_clock"
-        android:title="@string/hide_clock"
-        android:icon="@drawable/ic_menu_clock_face"/>
     <item android:id="@+id/menu_settings"
         android:title="@string/settings"
         android:icon="@android:drawable/ic_menu_preferences"/>
index 732bee8..8abbd71 100644 (file)
@@ -105,20 +105,6 @@ public class AlarmAlert extends Activity {
 
         setContentView(inflateView(inflater));
 
-        /* set clock face */
-        SharedPreferences settings =
-                getSharedPreferences(AlarmClock.PREFERENCES, 0);
-        int face = settings.getInt(AlarmClock.PREF_CLOCK_FACE, 0);
-        if (face < 0 || face >= AlarmClock.CLOCKS.length) {
-            face = 0;
-        }
-        ViewGroup clockView = (ViewGroup) findViewById(R.id.clockView);
-        inflater.inflate(AlarmClock.CLOCKS[face], clockView);
-        View clockLayout = findViewById(R.id.clock);
-        if (clockLayout instanceof DigitalClock) {
-            ((DigitalClock) clockLayout).setAnimate();
-        }
-
         /* snooze behavior: pop a snooze confirmation view, kick alarm
            manager. */
         Button snooze = (Button) findViewById(R.id.snooze);
index cb9fc35..4b339d1 100644 (file)
@@ -54,8 +54,6 @@ import java.text.DateFormatSymbols;
 public class AlarmClock extends Activity implements OnItemClickListener {
 
     final static String PREFERENCES = "AlarmClock";
-    final static String PREF_CLOCK_FACE = "face";
-    final static String PREF_SHOW_CLOCK = "show_clock";
 
     /** Cap alarm count at this number */
     final static int MAX_ALARM_COUNT = 12;
@@ -66,29 +64,11 @@ public class AlarmClock extends Activity implements OnItemClickListener {
 
     private SharedPreferences mPrefs;
     private LayoutInflater mFactory;
-    private ViewGroup mClockLayout;
-    private View mClock = null;
     private ListView mAlarmsList;
     private Cursor mCursor;
 
     private String mAm, mPm;
 
-    /**
-     * Which clock face to show
-     */
-    private int mFace = -1;
-
-    /*
-     * FIXME: it would be nice for this to live in an xml config file.
-     */
-    final static int[] CLOCKS = {
-        R.layout.clock_basic_bw,
-        R.layout.clock_googly,
-        R.layout.clock_droid2,
-        R.layout.clock_droids,
-        R.layout.digital_clock
-    };
-
     private class AlarmTimeAdapter extends CursorAdapter {
         public AlarmTimeAdapter(Context context, Cursor cursor) {
             super(context, cursor);
@@ -208,14 +188,6 @@ public class AlarmClock extends Activity implements OnItemClickListener {
         mCursor = Alarms.getAlarmsCursor(getContentResolver());
 
         updateLayout();
-        setClockVisibility(mPrefs.getBoolean(PREF_SHOW_CLOCK, true));
-    }
-
-    @Override
-    public void onConfigurationChanged(Configuration newConfig) {
-        super.onConfigurationChanged(newConfig);
-        updateLayout();
-        inflateClock();
     }
 
     private void updateLayout() {
@@ -225,31 +197,6 @@ public class AlarmClock extends Activity implements OnItemClickListener {
         mAlarmsList.setVerticalScrollBarEnabled(true);
         mAlarmsList.setOnItemClickListener(this);
         mAlarmsList.setOnCreateContextMenuListener(this);
-
-        mClockLayout = (ViewGroup) findViewById(R.id.clock_layout);
-        mClockLayout.setOnClickListener(new View.OnClickListener() {
-                public void onClick(View v) {
-                    final Intent intent =
-                            new Intent(AlarmClock.this, ClockPicker.class);
-                    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-                    startActivity(intent);
-                }
-            });
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-
-        int face = mPrefs.getInt(PREF_CLOCK_FACE, 0);
-        if (mFace != face) {
-            if (face < 0 || face >= AlarmClock.CLOCKS.length) {
-                mFace = 0;
-            } else {
-                mFace = face;
-            }
-            inflateClock();
-        }
     }
 
     @Override
@@ -259,25 +206,6 @@ public class AlarmClock extends Activity implements OnItemClickListener {
         mCursor.deactivate();
     }
 
-    protected void inflateClock() {
-        if (mClock != null) {
-            mClockLayout.removeView(mClock);
-        }
-
-        LayoutInflater.from(this).inflate(CLOCKS[mFace], mClockLayout);
-        mClock = findViewById(R.id.clock);
-
-        TextView am = (TextView) findViewById(R.id.am);
-        TextView pm = (TextView) findViewById(R.id.pm);
-
-        if (am != null) {
-            am.setText(mAm);
-        }
-        if (pm != null) {
-            pm.setText(mPm);
-        }
-    }
-
     @Override
     public boolean onCreateOptionsMenu(Menu menu) {
         // Inflate our menu.
@@ -333,9 +261,6 @@ public class AlarmClock extends Activity implements OnItemClickListener {
     public boolean onPrepareOptionsMenu(Menu menu) {
         menu.findItem(R.id.menu_add_alarm).setVisible(
                 mAlarmsList.getAdapter().getCount() < MAX_ALARM_COUNT);
-        menu.findItem(R.id.menu_toggle_clock).setTitle(
-                getClockVisibility() ? R.string.hide_clock
-                    : R.string.show_clock);
         return super.onPrepareOptionsMenu(menu);
     }
 
@@ -355,11 +280,6 @@ public class AlarmClock extends Activity implements OnItemClickListener {
                 startActivity(intent);
                 return true;
 
-            case R.id.menu_toggle_clock:
-                setClockVisibility(!getClockVisibility());
-                saveClockVisibility();
-                return true;
-
             case R.id.menu_settings:
                 startActivity(new Intent(this, SettingsActivity.class));
                 return true;
@@ -367,17 +287,4 @@ public class AlarmClock extends Activity implements OnItemClickListener {
 
         return super.onOptionsItemSelected(item);
     }
-
-
-    private boolean getClockVisibility() {
-        return mClockLayout.getVisibility() == View.VISIBLE;
-    }
-
-    private void setClockVisibility(boolean visible) {
-        mClockLayout.setVisibility(visible ? View.VISIBLE : View.GONE);
-    }
-
-    private void saveClockVisibility() {
-        mPrefs.edit().putBoolean(PREF_SHOW_CLOCK, getClockVisibility()).commit();
-    }
 }
diff --git a/src/com/android/deskclock/ClockPicker.java b/src/com/android/deskclock/ClockPicker.java
deleted file mode 100644 (file)
index 077eba1..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (C) 2008 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.
- */
-
-package com.android.deskclock;
-
-import android.app.Activity;
-import android.content.SharedPreferences;
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.Window;
-import android.widget.AdapterView;
-import android.widget.BaseAdapter;
-import android.widget.Gallery;
-
-/**
- * Clock face picker for the Alarm Clock application.
- */
-public class ClockPicker extends Activity implements
-        AdapterView.OnItemSelectedListener, AdapterView.OnItemClickListener {
-
-    private LayoutInflater mFactory;
-    private Gallery mGallery;
-
-    private SharedPreferences mPrefs;
-    private View mClock;
-    private ViewGroup mClockLayout;
-    private int mPosition;
-
-    @Override
-    public void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-        requestWindowFeature(Window.FEATURE_NO_TITLE);
-
-        mFactory = LayoutInflater.from(this);
-        setContentView(R.layout.clockpicker);
-
-        mGallery = (Gallery) findViewById(R.id.gallery);
-        mGallery.setAdapter(new ClockAdapter());
-        mGallery.setOnItemSelectedListener(this);
-        mGallery.setOnItemClickListener(this);
-
-        mPrefs = getSharedPreferences(AlarmClock.PREFERENCES, 0);
-        int face = mPrefs.getInt(AlarmClock.PREF_CLOCK_FACE, 0);
-        if (face < 0 || face >= AlarmClock.CLOCKS.length) face = 0;
-
-        mClockLayout = (ViewGroup) findViewById(R.id.clock_layout);
-        mClockLayout.setOnClickListener(new View.OnClickListener() {
-                public void onClick(View v) {
-                    selectClock(mPosition);
-                }
-        });
-
-        mGallery.setSelection(face, false);
-    }
-
-    public void onItemSelected(AdapterView parent, View v, int position, long id) {
-        if (mClock != null) {
-            mClockLayout.removeView(mClock);
-        }
-        mClock = mFactory.inflate(AlarmClock.CLOCKS[position], null);
-        mClockLayout.addView(mClock, 0);
-        mPosition = position;
-    }
-
-    public void onItemClick(AdapterView parent, View v, int position, long id) {
-        selectClock(position);
-    }
-
-    private synchronized void selectClock(int position) {
-        SharedPreferences.Editor ed = mPrefs.edit();
-        ed.putInt(AlarmClock.PREF_CLOCK_FACE, position);
-        ed.commit();
-
-        setResult(RESULT_OK);
-        finish();
-    }
-
-    public void onNothingSelected(AdapterView parent) {
-    }
-
-    class ClockAdapter extends BaseAdapter {
-
-        public ClockAdapter() {
-        }
-
-        public int getCount() {
-            return AlarmClock.CLOCKS.length;
-        }
-
-        public Object getItem(int position) {
-            return position;
-        }
-
-        public long getItemId(int position) {
-            return position;
-        }
-
-        public View getView(final int position, View convertView, ViewGroup parent) {
-            View clock = mFactory.inflate(AlarmClock.CLOCKS[position], null);
-            return clock;
-        }
-
-    }
-}
index 14205e7..d58154c 100644 (file)
@@ -22,8 +22,6 @@ import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.res.Resources;
 import android.database.ContentObserver;
-import android.graphics.drawable.AnimationDrawable;
-import android.graphics.drawable.Drawable;
 import android.os.Handler;
 import android.provider.Settings;
 import android.text.format.DateFormat;
@@ -45,7 +43,6 @@ public class DigitalClock extends LinearLayout {
     private String mFormat;
     private TextView mTimeDisplay;
     private AmPm mAmPm;
-    private boolean mAnimate;
     private ContentObserver mFormatChangeObserver;
     private boolean mLive = true;
     private boolean mAttached;
@@ -128,12 +125,6 @@ public class DigitalClock extends LinearLayout {
         if (mAttached) return;
         mAttached = true;
 
-        if (mAnimate) {
-            setBackgroundResource(R.drawable.animate_circle);
-            /* Start the animation (looped playback by default). */
-            ((AnimationDrawable) getBackground()).start();
-        }
-
         if (mLive) {
             /* monitor time ticks, time changed, timezone */
             IntentFilter filter = new IntentFilter();
@@ -158,11 +149,6 @@ public class DigitalClock extends LinearLayout {
         if (!mAttached) return;
         mAttached = false;
 
-        Drawable background = getBackground();
-        if (background instanceof AnimationDrawable) {
-            ((AnimationDrawable) background).stop();
-        }
-
         if (mLive) {
             mContext.unregisterReceiver(mIntentReceiver);
         }
@@ -191,10 +177,6 @@ public class DigitalClock extends LinearLayout {
         mAmPm.setShowAmPm(mFormat == M12);
     }
 
-    void setAnimate() {
-        mAnimate = true;
-    }
-
     void setLive(boolean live) {
         mLive = live;
     }