Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da531f18 authored by Robyn Coultas's avatar Robyn Coultas Committed by Android (Google) Code Review
Browse files

Merge "Pre-redline changes for adding a timer" into ics-ub-clock-amazon

parents 4db68b94 56be6dac
Loading
Loading
Loading
Loading
+75 −20
Original line number Diff line number Diff line
@@ -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"
    <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"
        <include
                layout="@layout/three_keys_view"
                android:id="@+id/second"/>

    <include layout="@layout/three_keys_view"
        <include
                layout="@layout/three_keys_view"
                android:id="@+id/third"/>

    <include layout="@layout/three_keys_view"
        <include
                layout="@layout/three_keys_view"
                android:id="@+id/fourth"/>

        <View
                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>

</LinearLayout>
+0 −45
Original line number Diff line number Diff line
<?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>
+0 −45
Original line number Diff line number Diff line
<?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>

res/layout/time_picker_dialog.xml

deleted100644 → 0
+0 −57
Original line number Diff line number Diff line
<?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>

res/layout/time_picker_view.xml

deleted100644 → 0
+0 −124
Original line number Diff line number Diff line
<?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>
Loading