summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorRobyn Coultas <coultasr@android.com>2013-08-28 00:23:55 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-28 00:23:56 +0000
commitda531f188547437f92c1e00478aef1f5a9e82da0 (patch)
treea0e046ff1b7a9ca3f219c25c0e9f51816b7e5062 /res
parent4db68b9431fda9236c255b1a38002ddb1b4dcb7f (diff)
parent56be6dac87bd9735cef70da1b39ce8c9d89148f0 (diff)
downloadandroid_packages_apps_DeskClock-da531f188547437f92c1e00478aef1f5a9e82da0.tar.gz
android_packages_apps_DeskClock-da531f188547437f92c1e00478aef1f5a9e82da0.tar.bz2
android_packages_apps_DeskClock-da531f188547437f92c1e00478aef1f5a9e82da0.zip
Merge "Pre-redline changes for adding a timer" into ics-ub-clock-amazon
Diffstat (limited to 'res')
-rw-r--r--res/layout-land/time_setup_view.xml95
-rw-r--r--res/layout-sw600dp/three_keys_view_ampm.xml45
-rw-r--r--res/layout/three_keys_view_ampm.xml45
-rw-r--r--res/layout/time_picker_dialog.xml57
-rw-r--r--res/layout/time_picker_view.xml124
-rw-r--r--res/layout/time_setup_view.xml45
-rw-r--r--res/layout/timer_fragment.xml63
7 files changed, 132 insertions, 342 deletions
diff --git a/res/layout-land/time_setup_view.xml b/res/layout-land/time_setup_view.xml
index 01157c85e..9e6cc2498 100644
--- a/res/layout-land/time_setup_view.xml
+++ b/res/layout-land/time_setup_view.xml
@@ -16,12 +16,17 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical">
+ android:orientation="horizontal">
+ <!-- This nested ltr layout cannot be combined with the parent because
+ in RTL, the Keypad and Timer value should swap. -->
<LinearLayout
android:layoutDirection="ltr"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:orientation="horizontal"
+ android:layout_weight="3"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:gravity="center">
<com.android.deskclock.timer.TimerView
android:id="@+id/timer_time_text"
@@ -54,25 +59,75 @@
</LinearLayout>
- <View
- android:layout_width="match_parent"
- android:layout_height="1dip"
- android:layout_marginBottom="8dip"
- android:background="@color/dialog_gray" />
- <include layout="@layout/three_keys_view"
- android:id="@+id/first" />
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_weight="2"
+ android:layout_width="0dp"
+ android:layout_height="match_parent">
+
+ <include
+ layout="@layout/three_keys_view"
+ android:id="@+id/first"/>
+
+ <include
+ layout="@layout/three_keys_view"
+ android:id="@+id/second"/>
+
+ <include
+ layout="@layout/three_keys_view"
+ android:id="@+id/third"/>
+
+ <include
+ layout="@layout/three_keys_view"
+ android:id="@+id/fourth"/>
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:layout_marginTop="16dip"/>
- <include layout="@layout/three_keys_view"
- android:id="@+id/second"/>
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="48dip">
- <include layout="@layout/three_keys_view"
- android:id="@+id/third"/>
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:background="#28ffffff"/>
- <include layout="@layout/three_keys_view"
- android:id="@+id/fourth" />
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <Button
+ android:id="@+id/timer_cancel"
+ android:text="@string/timer_cancel"
+ android:layout_width="match_parent"
+ style="@style/button"
+ android:layout_weight="1"
+ android:background="@drawable/item_background"
+ android:layout_height="wrap_content"/>
+
+ <View
+ android:id="@+id/timer_button_sep"
+ android:layout_height="match_parent"
+ android:layout_marginTop="8dip"
+ android:layout_marginBottom="8dip"
+ android:layout_width="1dip"
+ android:background="#28ffffff"/>
+
+ <Button
+ android:id="@+id/timer_start"
+ android:text="@string/timer_start"
+ android:layout_width="match_parent"
+ style="@style/button"
+ android:layout_weight="1"
+ android:background="@drawable/item_background"
+ android:layout_height="wrap_content"/>
+
+ </LinearLayout>
+
+ </FrameLayout>
+ </LinearLayout>
- <View
- android:layout_width="match_parent"
- android:layout_height="1dip"
- android:layout_marginTop="16dip" />
</LinearLayout>
diff --git a/res/layout-sw600dp/three_keys_view_ampm.xml b/res/layout-sw600dp/three_keys_view_ampm.xml
deleted file mode 100644
index aca5e7589..000000000
--- a/res/layout-sw600dp/three_keys_view_ampm.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 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:layout_width="match_parent"
- android:layout_weight="1"
- android:gravity="center"
- android:layoutDirection="ltr"
- android:layout_height="0dip">
- <Button
- android:id="@+id/key_left"
- android:layoutDirection="locale"
- android:layout_width="0dip"
- android:layout_weight="1"
- style="@style/tablet_dialpad_ampm"
- android:background="@drawable/item_background"
- android:layout_height="match_parent" />
- <Button
- android:id="@+id/key_middle"
- android:background="@drawable/item_background"
- android:layout_width="0dip"
- android:layout_weight="1"
- style="@style/tablet_dialpad"
- android:layout_height="match_parent" />
- <Button
- android:id="@+id/key_right"
- android:layoutDirection="locale"
- android:background="@drawable/item_background"
- android:layout_weight="1"
- android:layout_width="0dip"
- style="@style/tablet_dialpad_ampm"
- android:layout_height="match_parent" />
-</LinearLayout>
diff --git a/res/layout/three_keys_view_ampm.xml b/res/layout/three_keys_view_ampm.xml
deleted file mode 100644
index 44c2d3f34..000000000
--- a/res/layout/three_keys_view_ampm.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 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:layout_width="match_parent"
- android:layout_weight="1"
- android:gravity="center"
- android:layoutDirection="ltr"
- android:layout_height="0dip">
- <Button
- android:id="@+id/key_left"
- android:layoutDirection="locale"
- android:layout_width="0dip"
- android:layout_weight="1"
- style="@style/dialpad_ampm"
- android:background="@drawable/item_background"
- android:layout_height="match_parent" />
- <Button
- android:id="@+id/key_middle"
- android:background="@drawable/item_background"
- android:layout_width="0dip"
- android:layout_weight="1"
- style="@style/dialpad"
- android:layout_height="match_parent" />
- <Button
- android:id="@+id/key_right"
- android:layoutDirection="locale"
- android:background="@drawable/item_background"
- android:layout_weight="1"
- android:layout_width="0dip"
- style="@style/dialpad_ampm"
- android:layout_height="match_parent" />
-</LinearLayout>
diff --git a/res/layout/time_picker_dialog.xml b/res/layout/time_picker_dialog.xml
deleted file mode 100644
index 1c44d4d36..000000000
--- a/res/layout/time_picker_dialog.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2012 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:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <com.android.deskclock.TimePicker
- android:id="@+id/time_picker"
- android:layout_width="match_parent"
- android:layout_height="match_parent" />
- <View
- android:layout_width="match_parent"
- android:layout_height="1dip"
- android:background="#28ffffff" />
- <LinearLayout
- android:gravity="bottom"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" >
- <Button
- android:id="@+id/cancel_button"
- android:text="@string/time_picker_cancel"
- android:layout_width="0dip"
- android:layout_weight="1"
- style="@style/dialog_button"
- android:background="@drawable/item_background"
- android:layout_height="wrap_content" />
- <View
- android:layout_height="match_parent"
- android:layout_marginTop="8dip"
- android:layout_marginBottom="8dip"
- android:layout_width="1dip"
- android:background="#28ffffff" />
- <Button
- android:id="@+id/set_button"
- android:text="@string/time_picker_set"
- android:layout_width="0dip"
- android:layout_weight="1"
- style="@style/dialog_button"
- android:background="@drawable/item_background"
- android:layout_height="wrap_content" />
- </LinearLayout>
-</LinearLayout>
diff --git a/res/layout/time_picker_view.xml b/res/layout/time_picker_view.xml
deleted file mode 100644
index 5947ae8c0..000000000
--- a/res/layout/time_picker_view.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 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:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layoutDirection="ltr"
- android:gravity="center">
-
- <com.android.deskclock.timer.TimerView
- android:id="@+id/timer_time_text"
- android:layout_width="0dip"
- android:layout_weight="2"
- android:layout_height="wrap_content"
- android:paddingTop="@dimen/medium_font_padding"
- android:paddingBottom="@dimen/medium_font_padding"
- android:paddingLeft="@dimen/timer_padding_left"
- android:paddingStart="@dimen/timer_padding_left"
- android:layout_gravity="center"
- android:baselineAligned="true"
- android:gravity="top">
-
- <TextView
- android:id="@+id/hours_tens"
- android:singleLine="true"
- android:ellipsize="none"
- style="@style/medium_light"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:textColor="@color/clock_white"/>
- <TextView
- android:id="@+id/hours_ones"
- android:singleLine="true"
- android:ellipsize="none"
- style="@style/medium_light"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:textColor="@color/clock_white"/>
-
- <TextView
- android:id="@+id/hours_seperator"
- android:singleLine="true"
- android:ellipsize="none"
- style="@style/medium_light"
- android:text="@string/time_picker_time_seperator"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:textColor="@color/clock_white"/>
-
- <TextView
- android:id="@+id/minutes_tens"
- android:singleLine="true"
- android:ellipsize="none"
- style="@style/medium_light"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:textColor="@color/clock_white"/>
- <TextView
- android:id="@+id/minutes_ones"
- android:singleLine="true"
- android:ellipsize="none"
- style="@style/medium_light"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:textColor="@color/clock_white"/>
-
- <TextView
- android:id="@+id/ampm_label"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:singleLine="true"
- android:ellipsize="none"
- style="@style/label"
- android:gravity="top"
- android:text="@string/time_picker_ampm_label"
- android:textColor="@color/clock_white"/>
-
- </com.android.deskclock.timer.TimerView>
-
- <ImageButton
- android:id="@+id/delete"
- android:layout_width="0dip"
- android:layout_weight="1"
- android:gravity="center"
- android:layout_gravity="center"
- android:src="@drawable/ic_backspace"
- android:background="@drawable/item_background"
- android:contentDescription="@string/timer_delete"
- android:layout_height="match_parent" />
-
- </LinearLayout>
-
- <View
- android:layout_width="match_parent"
- android:layout_height="1dip"
- android:background="@color/dialog_gray" />
- <include layout="@layout/three_keys_view"
- android:id="@+id/first" />
-
- <include layout="@layout/three_keys_view"
- android:id="@+id/second"/>
-
- <include layout="@layout/three_keys_view"
- android:id="@+id/third"/>
-
- <include layout="@layout/three_keys_view_ampm"
- android:id="@+id/fourth" />
- </LinearLayout>
diff --git a/res/layout/time_setup_view.xml b/res/layout/time_setup_view.xml
index ee902d9c8..1cb038e20 100644
--- a/res/layout/time_setup_view.xml
+++ b/res/layout/time_setup_view.xml
@@ -19,6 +19,7 @@
android:orientation="vertical">
<LinearLayout
+ android:orientation="horizontal"
android:layoutDirection="ltr"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@@ -72,4 +73,48 @@
android:layout_width="match_parent"
android:layout_height="1dip"
android:layout_marginTop="16dip" />
+
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="48dip">
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:background="#28ffffff"/>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <Button
+ android:id="@+id/timer_cancel"
+ android:text="@string/timer_cancel"
+ android:layout_width="match_parent"
+ style="@style/button"
+ android:layout_weight="1"
+ android:background="@drawable/item_background"
+ android:layout_height="wrap_content"/>
+
+ <View
+ android:id="@+id/timer_button_sep"
+ android:layout_height="match_parent"
+ android:layout_marginTop="8dip"
+ android:layout_marginBottom="8dip"
+ android:layout_width="1dip"
+ android:background="#28ffffff"/>
+
+ <Button
+ android:id="@+id/timer_start"
+ android:text="@string/timer_start"
+ android:layout_width="match_parent"
+ style="@style/button"
+ android:layout_weight="1"
+ android:background="@drawable/item_background"
+ android:layout_height="wrap_content"/>
+
+ </LinearLayout>
+
+ </FrameLayout>
+
</LinearLayout>
diff --git a/res/layout/timer_fragment.xml b/res/layout/timer_fragment.xml
index 912fc58c1..55cc8e932 100644
--- a/res/layout/timer_fragment.xml
+++ b/res/layout/timer_fragment.xml
@@ -13,7 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@@ -52,55 +52,16 @@
android:background="@drawable/main_button_normal" />
</FrameLayout>
</FrameLayout>
- <LinearLayout
- android:id="@+id/new_timer_page"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginLeft="8dip"
- android:layout_marginStart="8dip"
- android:layout_marginRight="8dip"
- android:layout_marginEnd="8dip"
- android:paddingTop="?android:attr/actionBarSize"
- android:orientation="vertical">
- <com.android.deskclock.TimerSetupView
+
+
+ <com.android.deskclock.TimerSetupView
android:id="@+id/timer_setup"
android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1" />
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="48dip">
- <View
- android:layout_width="match_parent"
- android:layout_height="1dip"
- android:background="#28ffffff" />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content" >
- <Button
- android:id="@+id/timer_cancel"
- android:text="@string/timer_cancel"
- android:layout_width="match_parent"
- style="@style/button"
- android:layout_weight="1"
- android:background="@drawable/item_background"
- android:layout_height="wrap_content" />
- <View
- android:id="@+id/timer_button_sep"
- android:layout_height="match_parent"
- android:layout_marginTop="8dip"
- android:layout_marginBottom="8dip"
- android:layout_width="1dip"
- android:background="#28ffffff" />
- <Button
- android:id="@+id/timer_start"
- android:text="@string/timer_start"
- android:layout_width="match_parent"
- style="@style/button"
- android:layout_weight="1"
- android:background="@drawable/item_background"
- android:layout_height="wrap_content" />
- </LinearLayout>
- </FrameLayout>
- </LinearLayout>
-</LinearLayout>
+ android:layout_height="match_parent"
+ android:layout_marginLeft="8dip"
+ android:layout_marginStart="8dip"
+ android:layout_marginRight="8dip"
+ android:layout_marginEnd="8dip"
+ android:paddingTop="?android:attr/actionBarSize"/>
+
+</FrameLayout>