summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorRobyn Coultas <coultasr@android.com>2012-11-12 17:28:28 -0800
committerRobyn Coultas <coultasr@android.com>2012-11-29 17:02:04 -0800
commit87bf27c22cf71bfb89e97eba92d4513148d3d8c8 (patch)
tree18ba02462b06ede64587382f991679c4402ea716 /res
parent68e39c4c8da5e9f4c7626a20be44e7fa977ea96c (diff)
downloadandroid_packages_apps_DeskClock-87bf27c22cf71bfb89e97eba92d4513148d3d8c8.tar.gz
android_packages_apps_DeskClock-87bf27c22cf71bfb89e97eba92d4513148d3d8c8.tar.bz2
android_packages_apps_DeskClock-87bf27c22cf71bfb89e97eba92d4513148d3d8c8.zip
Aligning columns in stopwatch lap times
Bug: 7282042 Bug: 7539981 margin between total and lap times string-array format for lap# and lap,total times lap display centered in portrait optimized landscape layout to give more room for list using '#' instead of 'LAP' removed unneeded margins on world clock; new dimen for timer margins char limit on "Lap" and the hour, minute, second abbreviations sw list handles times up to 1k hours circle handles times up to 1k hours Change-Id: If4e884ffd7b87986024c6d5a5990e529b1d6d736
Diffstat (limited to 'res')
-rw-r--r--res/layout-land/stopwatch_fragment.xml5
-rw-r--r--res/layout-land/timer_list_item.xml4
-rw-r--r--res/layout/lap_view.xml12
-rw-r--r--res/layout/timer_list_item.xml4
-rw-r--r--res/layout/world_clock_list_item.xml4
-rw-r--r--res/values-land/dimens.xml5
-rw-r--r--res/values-sw600dp-land/dimens.xml5
-rw-r--r--res/values-sw600dp/dimens.xml3
-rw-r--r--res/values/dimens.xml6
-rw-r--r--res/values/strings.xml40
10 files changed, 64 insertions, 24 deletions
diff --git a/res/layout-land/stopwatch_fragment.xml b/res/layout-land/stopwatch_fragment.xml
index 7f7030277..b35f6dac2 100644
--- a/res/layout-land/stopwatch_fragment.xml
+++ b/res/layout-land/stopwatch_fragment.xml
@@ -25,7 +25,7 @@
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/circle_margin"
android:layout_marginRight="@dimen/circle_margin"
- android:layout_weight="1" >
+ android:layout_weight="0.95" >
<com.android.deskclock.timer.CountingTimerView
android:id="@+id/stopwatch_time_text"
@@ -78,8 +78,7 @@
<ListView
android:id="@+id/laps_list"
android:layout_weight="1"
- android:layout_marginLeft="@dimen/laps_margin"
- android:layout_marginRight="@dimen/laps_margin"
+ android:layout_marginRight="@dimen/sw_right_margin"
android:layout_gravity="center"
android:layout_width="0dip"
android:layout_height="wrap_content" />
diff --git a/res/layout-land/timer_list_item.xml b/res/layout-land/timer_list_item.xml
index 15ddfdf31..854d19d54 100644
--- a/res/layout-land/timer_list_item.xml
+++ b/res/layout-land/timer_list_item.xml
@@ -27,8 +27,8 @@
android:id="@+id/timer_frame"
android:layout_width="@dimen/timer_circle_width"
android:layout_height="@dimen/timer_circle_diameter"
- android:layout_marginLeft="@dimen/circle_margin"
- android:layout_marginRight="@dimen/circle_margin">
+ android:layout_marginLeft="@dimen/timer_circle_margin"
+ android:layout_marginRight="@dimen/timer_circle_margin">
<com.android.deskclock.CircleTimerView
android:id="@+id/timer_time"
diff --git a/res/layout/lap_view.xml b/res/layout/lap_view.xml
index 30d875783..f4e90f8dd 100644
--- a/res/layout/lap_view.xml
+++ b/res/layout/lap_view.xml
@@ -18,25 +18,24 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_marginTop="4dip"
android:layout_marginBottom="4dip"
+ android:gravity="center"
android:paddingTop="@dimen/body_font_padding"
android:paddingBottom="@dimen/body_font_padding"
- android:paddingLeft="@dimen/laps_margin"
- android:paddingRight="@dimen/laps_margin"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/clock_gray"
- android:layout_marginRight="8dip"
+ android:layout_marginRight="@dimen/sw_item_space"
android:gravity="left"
style="@style/body"
android:textAllCaps="false"
android:id="@+id/lap_number" />
<TextView
- android:layout_width="0dip"
- android:layout_weight="1"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginRight="@dimen/sw_item_space"
android:textColor="@color/clock_gray"
android:gravity="right"
style="@style/body"
@@ -44,8 +43,7 @@
android:id="@+id/lap_time" />
<TextView
android:layout_height="wrap_content"
- android:layout_width="0dip"
- android:layout_weight="1"
+ android:layout_width="wrap_content"
android:textColor="@color/clock_gray"
android:gravity="right"
style="@style/body"
diff --git a/res/layout/timer_list_item.xml b/res/layout/timer_list_item.xml
index 1dfc04f28..f5ac85101 100644
--- a/res/layout/timer_list_item.xml
+++ b/res/layout/timer_list_item.xml
@@ -27,8 +27,8 @@
android:id="@+id/timer_frame"
android:layout_width="match_parent"
android:layout_height="@dimen/timer_circle_diameter"
- android:layout_marginLeft="@dimen/circle_margin"
- android:layout_marginRight="@dimen/circle_margin">
+ android:layout_marginLeft="@dimen/timer_circle_margin"
+ android:layout_marginRight="@dimen/timer_circle_margin">
<com.android.deskclock.CircleTimerView
android:id="@+id/timer_time"
diff --git a/res/layout/world_clock_list_item.xml b/res/layout/world_clock_list_item.xml
index 4628d9ae8..a8322655d 100644
--- a/res/layout/world_clock_list_item.xml
+++ b/res/layout/world_clock_list_item.xml
@@ -18,8 +18,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginRight="@dimen/circle_margin"
- android:layout_marginLeft="@dimen/circle_margin"
+ android:layout_marginRight="@dimen/world_clock_margin"
+ android:layout_marginLeft="@dimen/world_clock_margin"
android:orientation="horizontal">
diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
index 7967c3f8e..7b75074cc 100644
--- a/res/values-land/dimens.xml
+++ b/res/values-land/dimens.xml
@@ -39,8 +39,11 @@
<!-- Size of margin for circles. -->
<dimen name="circle_margin">8dp</dimen>
- <dimen name="laps_margin">16dp</dimen>
<dimen name="analog_clock_margin">200dp</dimen>
+ <dimen name="timer_circle_margin">8dp</dimen>
+
+ <dimen name="world_clock_margin">8dp</dimen>
+ <dimen name="sw_right_margin">8dp</dimen>
<!-- Extra offset for timer button paddings. Only nonzero for non-tablets. -->
<dimen name="timer_button_extra_offset">45dip</dimen>
diff --git a/res/values-sw600dp-land/dimens.xml b/res/values-sw600dp-land/dimens.xml
index 822e1d992..8ecb43dc7 100644
--- a/res/values-sw600dp-land/dimens.xml
+++ b/res/values-sw600dp-land/dimens.xml
@@ -38,8 +38,11 @@
<!-- Size of margin for circles. -->
<dimen name="circle_margin_top">16dp</dimen>
<dimen name="circle_margin">48dp</dimen>
- <dimen name="laps_margin">36dp</dimen>
<dimen name="analog_clock_margin">48dp</dimen>
+ <dimen name="timer_circle_margin">48dp</dimen>
+
+ <dimen name="world_clock_margin">48dp</dimen>
+ <dimen name="sw_right_margin">48dp</dimen>
<!-- Empty space at the edges of the +1 and reset button icons. Based off of 56dip width.-->
<dimen name="plusone_reset_button_padding">23dip</dimen>
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
index 1efd8abac..544aa665e 100644
--- a/res/values-sw600dp/dimens.xml
+++ b/res/values-sw600dp/dimens.xml
@@ -58,14 +58,15 @@
<!-- Size of margin for circles. -->
<dimen name="circle_margin_top">48dp</dimen>
<dimen name="circle_margin">96dp</dimen>
- <dimen name="laps_margin">110dp</dimen>
<dimen name="analog_clock_margin">96dp</dimen>
+ <dimen name="timer_circle_margin">96dp</dimen>
<!-- Width of the clock, for use with alarm buttons. -->
<dimen name="alarm_alert_display_width">550dip</dimen>
<!-- Size of analog clock in world clock. -->
<dimen name="world_clock_analog_size">200dip</dimen>
+ <dimen name="world_clock_margin">96dp</dimen>
<!-- Empty space at the edges of the +1 and reset button icons. Based off of 56dip width.-->
<dimen name="plusone_reset_button_padding">23dip</dimen>
<!-- Empty space at the edges of the delete button icons. Based off of 56dip width. -->
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 51fd102b8..212dbd328 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -71,6 +71,7 @@
<dimen name="medium_space_top">24dp</dimen>
<dimen name="medium_space_bottom">8dp</dimen>
<dimen name="style_label_space">4dip</dimen>
+ <dimen name="sw_item_space">16dip</dimen>
<dimen name="label_margin_big">4dp</dimen>
<dimen name="label_margin_small">2dp</dimen>
@@ -88,8 +89,10 @@
<!-- Size of margin for circles. -->
<dimen name="circle_margin_top">16dp</dimen>
<dimen name="circle_margin">32dp</dimen>
- <dimen name="laps_margin">52dp</dimen>
<dimen name="analog_clock_margin">60dp</dimen>
+ <dimen name="timer_circle_margin">32dp</dimen>
+
+ <dimen name="sw_right_margin">32dp</dimen>
<!-- The width of the big icons in notifications. -->
<dimen name="notification_large_icon_width">64dp</dimen>
@@ -107,6 +110,7 @@
<!-- Size of analog clock in world clock. -->
<dimen name="world_clock_analog_size">100dip</dimen>
+ <dimen name="world_clock_margin">32dp</dimen>
<dimen name="toast_bar_bottom_margin_in_conversation">24dip</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index b07685944..94180e455 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -344,11 +344,11 @@
<!-- Describes the purpose of the button to share the stopwatch value. -->
<string name="sw_share_button">Share</string>
- <!-- Abbreviation for temporal hours -->
+ <!-- Abbreviation for temporal hours [CHAR LIMIT=1] -->
<string name="hours_label">h</string>
- <!-- Abbreviation for temporal minutes -->
+ <!-- Abbreviation for temporal minutes [CHAR LIMIT=1] -->
<string name="minutes_label">m</string>
- <!-- Abbreviation for temporal seconds -->
+ <!-- Abbreviation for temporal seconds [CHAR LIMIT=1] -->
<string name="seconds_label">s</string>
<!-- Accessibility strings -->
<string name="hours_label_description">hours</string>
@@ -362,8 +362,40 @@
<string name="sw_share_main">My time is <xliff:g id="time">%s</xliff:g></string>
<!-- Header within the message created to share a list of lap times (a new line is appended to this) -->
<string name="sw_share_laps">Lap times:</string>
- <!-- Label to enumerate the number of laps the user has counted -->
+ <!-- Label to enumerate the number of laps in the notification the user has counted -->
<string name="sw_notification_lap_number">Lap <xliff:g id="number">%d</xliff:g></string>
+ <!-- Formatted stopwatch time
+ [CHAR LIMIT=1] for each abbreviation as in hours_label, etc. -->
+ <string-array name="stopwatch_format_set">
+ <item> <!-- <10 minutes - example "1m 02s.03" -->
+ <xliff:g id="M">%2$d</xliff:g>m
+ <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>
+ </item>
+ <item> <!-- <1 hour - example "12m 03s.04" -->
+ <xliff:g id="M">%2$02d</xliff:g>m
+ <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>
+ </item>
+ <item> <!-- <10 hours - example "1h 02m 03s.04" -->
+ <xliff:g id="H">%1$d</xliff:g>h
+ <xliff:g id="M">%2$02d</xliff:g>m
+ <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>
+ </item>
+ <item> <!-- <100 hours - example "12h 03m 04s.05" -->
+ <xliff:g id="H">%1$02d</xliff:g>h
+ <xliff:g id="M">%2$02d</xliff:g>m
+ <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>
+ </item>
+ <item> <!-- <1000 hours - example "123h 04m 05s.06" -->
+ <xliff:g id="H">%1$03d</xliff:g>h
+ <xliff:g id="M">%2$02d</xliff:g>m
+ <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>
+ </item>
+ </string-array>
+ <!-- Label to enumerate the number of laps the user has counted -->
+ <string-array name="sw_lap_number_set" translatable="false">
+ <item># <xliff:g id="number">%d</xliff:g></item>
+ <item># <xliff:g id="number">%02d</xliff:g></item>
+ </string-array>
<!-- Stopwatch accessibility strings -->
<plurals name="Nhours_description">