Skip to content

Commit

Permalink
DeskClock: Fix pending bugs
Browse files Browse the repository at this point in the history
Fix some pending bugs from Stopwatch & Countdown:

- Add not translatable to arrays.xml
- Set fragment title size to 18sp (aosp default)
- Push over the add current timer text now adds the current timer, and not reset the timer
- Disallow create a new countdown timer if timer is 0
- Now, when "Lower times are better" is selected for the last lap behaviour, the green color
  is asigned for lower times.

Patch 2: Typos in arrays.xml
         Revert refreshRate patch because it didn't improve the lag when both timers
         are running. Change Digital Time Clock to decrease the redrawing times.
Patch 3: Change "swipe to right" text to "swipe to left", as Simon suggests
         Change layouts to make all buttons fit with the max height of them
         Fix a bug that cause to blink clock when the screen is rotated and the countdown
           is still running
         Protect DeskClockFrament#setWakeLock from NPE when FragmentActivity is null
Patch 4: Fix bug introduced in patch 3: the set button is not update the timer ui.
         Strings: Use unicode chars for copyright symbol
Patch 5: Fix a description and remove unnecessary lines at the bottom of strings.xml
Patch 6: Fix copyright signs, replace CountDown/Stopwatch with Countdown/Stopwatch in
         descriptions, remove useless comment, comply with Android Writing Style
Patch 7: Fix another copyright notice

Signed-off-by: KhasMek <Boushh@gmail.com>
Change-Id: Iabf564ab5a254f2f8b5d011ce6c08a271885ea1d
  • Loading branch information
jruesga authored and Gerrit Code Review committed Sep 22, 2012
1 parent 602d480 commit 43660e5
Show file tree
Hide file tree
Showing 13 changed files with 230 additions and 168 deletions.
8 changes: 4 additions & 4 deletions res/layout-land/countdown_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<Button
android:id="@+id/bt_timer_reset"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="@dimen/main_button_text_size"
android:text="@string/countdown_actions_reset"
Expand All @@ -73,7 +73,7 @@
<Button
android:id="@+id/bt_timer_main"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="@dimen/main_button_text_size"
android:text="@string/countdown_actions_start"
Expand All @@ -93,7 +93,7 @@
<Button
android:id="@+id/bt_timer_cancel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="@dimen/main_button_text_size"
android:text="@string/countdown_actions_cancel"
Expand All @@ -102,7 +102,7 @@
<Button
android:id="@+id/bt_timer_set"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="@dimen/main_button_text_size"
android:text="@string/countdown_actions_set"
Expand Down
6 changes: 3 additions & 3 deletions res/layout-land/stopwatch_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<Button
android:id="@+id/bt_timer_reset"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="@dimen/main_button_text_size"
android:text="@string/stopwatch_actions_reset"
Expand All @@ -100,7 +100,7 @@
<Button
android:id="@+id/bt_timer_main"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="@dimen/main_button_text_size"
android:text="@string/stopwatch_actions_start"
Expand All @@ -109,7 +109,7 @@
<Button
android:id="@+id/bt_timer_partial"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="@dimen/main_button_text_size"
android:text="@string/stopwatch_actions_lap"
Expand Down
8 changes: 4 additions & 4 deletions res/layout/countdown_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<Button
android:id="@+id/bt_timer_reset"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="@dimen/main_button_text_size"
android:text="@string/countdown_actions_reset"
Expand All @@ -66,7 +66,7 @@
<Button
android:id="@+id/bt_timer_main"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="@dimen/main_button_text_size"
android:text="@string/countdown_actions_start"
Expand All @@ -88,7 +88,7 @@
<Button
android:id="@+id/bt_timer_cancel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="@dimen/main_button_text_size"
android:text="@string/countdown_actions_cancel"
Expand All @@ -97,7 +97,7 @@
<Button
android:id="@+id/bt_timer_set"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="@dimen/main_button_text_size"
android:text="@string/countdown_actions_set"
Expand Down
6 changes: 3 additions & 3 deletions res/layout/stopwatch_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<Button
android:id="@+id/bt_timer_reset"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="@dimen/main_button_text_size"
android:text="@string/stopwatch_actions_reset"
Expand All @@ -94,7 +94,7 @@
<Button
android:id="@+id/bt_timer_main"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="@dimen/main_button_text_size"
android:text="@string/stopwatch_actions_start"
Expand All @@ -103,7 +103,7 @@
<Button
android:id="@+id/bt_timer_partial"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="@dimen/main_button_text_size"
android:text="@string/stopwatch_actions_lap"
Expand Down
78 changes: 46 additions & 32 deletions res/values/arrays.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Copyright (C) 2012 The CyanogenMod Project
2012 Android Open Kang 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.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">

<string-array name="aokp_clock_backgrounds_drawable" translatable="false">
<item>appwidget_aokp_blue_clock_dial</item>
<item>appwidget_aokp_pink_clock_dial</item>
Expand All @@ -13,36 +29,34 @@
<item>appwidget_aokp_jelly_clock_dial</item>
</string-array>

<!-- StopWatch. Best lap behaviour labels -->
<string-array name="stopwatch_best_lap_behaviour_labels">
<item>@string/stopwatch_best_lap_lower_pref</item>
<item>@string/stopwatch_best_lap_highest_pref</item>
</string-array>

<!-- StopWatch. Best lap behaviour summary -->
<string-array name="stopwatch_best_lap_behaviour_summary">
<item>@string/stopwatch_best_lap_lower_pref_summary</item>
<item>@string/stopwatch_best_lap_highest_pref_summary</item>
</string-array>

<!-- StopWatch. Best lap behaviour values -->
<string-array name="stopwatch_best_lap_behaviour_values" translable="false">
<item>0</item>
<item>1</item>
</string-array>

<!-- CountDown. Vibrate labels -->
<string-array name="countdown_vibrate_labels">
<item>@string/countdown_notification_onfinalcountdown_vibrate_always</item>
<item>@string/countdown_notification_onfinalcountdown_vibrate_only_when_silent</item>
<item>@string/countdown_notification_onfinalcountdown_vibrate_never</item>
</string-array>

<!-- CountDown. Vibrate values -->
<string-array name="countdown_vibrate_values" translable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<!-- Stopwatch. Best lap behaviour labels -->
<string-array name="stopwatch_best_lap_behaviour_labels" translatable="false">
<item>@string/stopwatch_best_lap_lower_pref</item>
<item>@string/stopwatch_best_lap_highest_pref</item>
</string-array>

<!-- Stopwatch. Best lap behaviour summary -->
<string-array name="stopwatch_best_lap_behaviour_summary" translatable="false">
<item>@string/stopwatch_best_lap_lower_pref_summary</item>
<item>@string/stopwatch_best_lap_highest_pref_summary</item>
</string-array>
<!-- Stopwatch. Best lap behaviour values -->
<string-array name="stopwatch_best_lap_behaviour_values" translatable="false">
<item>0</item>
<item>1</item>
</string-array>

<!-- CountDown. Vibrate labels -->
<string-array name="countdown_vibrate_labels" translatable="false">
<item>@string/countdown_notification_onfinalcountdown_vibrate_always</item>
<item>@string/countdown_notification_onfinalcountdown_vibrate_only_when_silent</item>
<item>@string/countdown_notification_onfinalcountdown_vibrate_never</item>
</string-array>
<!-- CountDown. Vibrate values -->
<string-array name="countdown_vibrate_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>

</resources>
2 changes: 1 addition & 1 deletion res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<dimen name="fragment_titlebar_horizontal_padding">8dip</dimen>
<dimen name="fragment_titlebar_icon_size">32dp</dimen>
<dimen name="fragment_titlebar_title_left_padding">5dip</dimen>
<dimen name="fragment_titlebar_title_text_size">20dp</dimen>
<dimen name="fragment_titlebar_title_text_size">18sp</dimen>

<!-- Timer Clock -->
<dimen name="main_timer_clock_text_size">38sp</dimen>
Expand Down
Loading

0 comments on commit 43660e5

Please sign in to comment.