From e6cf24dbbea56d8b88a8d48bed9d3a6f26c2ddf0 Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Mon, 2 Nov 2009 16:23:52 -0500 Subject: [PATCH] AlarmClock tweaks. - No more layout jumps when switching between dim/undim modes - Now registers itself as the "dock home"---that is, it hijacks the home softkey away from Launcher while the device is docked - Shows "on top" of the keyguard; all exits, however, will return to the keyguard before completing - Now uses the WindowManager to hold a wakelock when necessary - Tweaked weather display (bringing the weather icon size under control) --- AndroidManifest.xml | 5 +++ res/layout-land/desk_clock.xml | 1 + res/layout/desk_clock.xml | 1 + res/layout/desk_clock_buttons.xml | 1 - res/layout/desk_clock_weather.xml | 19 ++++++----- src/com/android/deskclock/DeskClock.java | 56 +++++++++++++++++++++----------- 6 files changed, 54 insertions(+), 29 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index fbfce2c..25ac74d 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -17,8 +17,13 @@ android:label="@string/app_label" android:theme="@android:style/Theme.Wallpaper.NoTitleBar" android:icon="@drawable/ic_widget_analog_clock" + android:launchMode="singleInstance" android:configChanges="orientation|keyboardHidden|keyboard|navigation"> > + + + + diff --git a/res/layout-land/desk_clock.xml b/res/layout-land/desk_clock.xml index 7079975..37f7c10 100644 --- a/res/layout-land/desk_clock.xml +++ b/res/layout-land/desk_clock.xml @@ -25,6 +25,7 @@ android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" + android:paddingTop="18dip" > diff --git a/res/layout/desk_clock.xml b/res/layout/desk_clock.xml index 66f1e7c..06f45d1 100644 --- a/res/layout/desk_clock.xml +++ b/res/layout/desk_clock.xml @@ -28,6 +28,7 @@ android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" + android:paddingTop="18dip" > diff --git a/res/layout/desk_clock_buttons.xml b/res/layout/desk_clock_buttons.xml index ad11cbe..35de5fe 100644 --- a/res/layout/desk_clock_buttons.xml +++ b/res/layout/desk_clock_buttons.xml @@ -14,7 +14,6 @@ limitations under the License. --> -