summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@google.com>2009-11-06 11:27:27 -0500
committerDaniel Sandler <dsandler@google.com>2009-11-06 11:29:03 -0500
commitdaa1dd3eb9ebb69817babdb74b125dc63889eb45 (patch)
tree3fa817e7b4ce08b578219e1f228ffab6bff645fe
parentff1c25c3be3934c2e7f0c3b338a204a582446894 (diff)
downloadandroid_packages_apps_DeskClock-daa1dd3eb9ebb69817babdb74b125dc63889eb45.tar.gz
android_packages_apps_DeskClock-daa1dd3eb9ebb69817babdb74b125dc63889eb45.tar.bz2
android_packages_apps_DeskClock-daa1dd3eb9ebb69817babdb74b125dc63889eb45.zip
DeskClock UI fixes.
- darker shade on the user's background - stop clipping the left-hand side of the time (was moving it over to accommodate Clockopia's generous tracking, but it's causing drawing issues) - AM/PM now in Droid Sans - calmer green in screen-saver mode
-rw-r--r--res/layout/desk_clock_time_date.xml7
-rw-r--r--src/com/android/deskclock/DeskClock.java22
-rw-r--r--src/com/android/deskclock/DigitalClock.java6
3 files changed, 10 insertions, 25 deletions
diff --git a/res/layout/desk_clock_time_date.xml b/res/layout/desk_clock_time_date.xml
index 068d03b2d..1eb1d53f3 100644
--- a/res/layout/desk_clock_time_date.xml
+++ b/res/layout/desk_clock_time_date.xml
@@ -28,10 +28,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="12dip"
- android:layout_marginLeft="-8dip"
>
- <!-- negative left margin above accounts for Clockopia's
- generous glyph padding -->
<TextView android:id="@+id/timeDisplay"
android:layout_width="wrap_content"
@@ -42,7 +39,7 @@
android:shadowColor="#C0000000"
android:shadowDx="0"
android:shadowDy="0"
- android:shadowRadius="3.0"
+ android:shadowRadius="3.0"
/>
@@ -66,7 +63,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
- android:textSize="18sp"
+ android:textSize="20sp"
android:textColor="#FFFFFFFF"
android:shadowColor="#C0000000"
android:shadowDx="0"
diff --git a/src/com/android/deskclock/DeskClock.java b/src/com/android/deskclock/DeskClock.java
index 51ebbdba3..8b72ee72b 100644
--- a/src/com/android/deskclock/DeskClock.java
+++ b/src/com/android/deskclock/DeskClock.java
@@ -99,8 +99,8 @@ public class DeskClock extends Activity {
private final long SCREEN_SAVER_MOVE_DELAY = 60 * 1000; // 1 min
// Color to use for text & graphics in screen saver mode.
- private final int SCREEN_SAVER_COLOR = 0xFF008000;
- private final int SCREEN_SAVER_COLOR_DIM = 0xFF003000;
+ private final int SCREEN_SAVER_COLOR = 0xFF308030;
+ private final int SCREEN_SAVER_COLOR_DIM = 0xFF183018;
// Internal message IDs.
private final int FETCH_WEATHER_DATA_MSG = 0x1000;
@@ -198,20 +198,6 @@ public class DeskClock extends Activity {
final View time_date = findViewById(R.id.time_date);
- /*
- final TranslateAnimation anim = new TranslateAnimation(
- Animation.RELATIVE_TO_SELF, 0, // fromX
- Animation.RELATIVE_TO_PARENT, 0.5f, // toX
- Animation.RELATIVE_TO_SELF, 0, // fromY
- Animation.RELATIVE_TO_PARENT, 0.5f // toY
- );
- anim.setDuration(1000);
- anim.setInterpolator(new android.view.animation.AccelerateDecelerateInterpolator());
- anim.setFillEnabled(true);
- anim.setFillAfter(true);
- time_date.startAnimation(anim);
- */
-
DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);
@@ -482,7 +468,7 @@ public class DeskClock extends Activity {
if (mDimmed) {
winParams.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN;
- winParams.dimAmount = 0.5f; // pump up contrast in dim mode
+ winParams.dimAmount = 0.67f; // pump up contrast in dim mode
// show the window tint
tintView.startAnimation(AnimationUtils.loadAnimation(this,
@@ -490,7 +476,7 @@ public class DeskClock extends Activity {
: R.anim.dim_instant));
} else {
winParams.flags &= (~WindowManager.LayoutParams.FLAG_FULLSCREEN);
- winParams.dimAmount = 0.2f; // lower contrast in normal mode
+ winParams.dimAmount = 0.5f; // lower contrast in normal mode
// hide the window tint
tintView.startAnimation(AnimationUtils.loadAnimation(this,
diff --git a/src/com/android/deskclock/DigitalClock.java b/src/com/android/deskclock/DigitalClock.java
index d28cc7de7..383ca7b02 100644
--- a/src/com/android/deskclock/DigitalClock.java
+++ b/src/com/android/deskclock/DigitalClock.java
@@ -68,7 +68,9 @@ public class DigitalClock extends LinearLayout {
AmPm(View parent, Typeface tf) {
mAmPm = (TextView) parent.findViewById(R.id.am_pm);
- mAmPm.setTypeface(tf);
+ if (tf != null) {
+ mAmPm.setTypeface(tf);
+ }
String[] ampm = new DateFormatSymbols().getAmPmStrings();
mAmString = ampm[0];
@@ -111,7 +113,7 @@ public class DigitalClock extends LinearLayout {
"fonts/Clockopia.ttf");
mTimeDisplay = (TextView) findViewById(R.id.timeDisplay);
mTimeDisplay.setTypeface(tf);
- mAmPm = new AmPm(this, tf);
+ mAmPm = new AmPm(this, null);
mCalendar = Calendar.getInstance();
setDateFormat();