summaryrefslogtreecommitdiffstats
path: root/res/layout/alarm_time.xml
blob: 5c3b19b78a9fde28e4f264b7c0f8c9be2fefa3b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 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="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

    <!-- I can't use a normal checkbox here for a couple reasons:
         1. The checkbox button resources cannot contain layouts so I have to
            use 2 views for the clock and the bar.
         2. The normal checkbox has a really messed up layout. Using the button
            attribute produces a left-aligned image that has some kind of
            minimum height. If the bar is a checkbox, it is too tall and is
            clipped on the right.
    -->
    <com.android.deskclock.DontPressWithParentLayout android:id="@+id/indicator"
        style="@style/alarm_list_left_column"
        android:background="@drawable/clock_selector"
        android:gravity="center"
        android:orientation="vertical">
        <CheckBox android:id="@+id/clock_onoff"
            android:focusable="false"
            android:clickable="false"
            android:background="@drawable/indicator_clock_onoff"
            android:duplicateParentState="true"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_gravity="center"
            android:button="@null" />
        <ImageView android:id="@+id/bar_onoff"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:paddingTop="4dip"
            android:src="@drawable/ic_indicator_off" />
    </com.android.deskclock.DontPressWithParentLayout>

    <ImageView
        android:src="@*android:drawable/divider_vertical_dark"
        android:background="?android:attr/windowBackground"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:paddingTop="4dip"
        android:paddingBottom="4dip"
        android:scaleType="fitXY"
        android:gravity="fill_vertical" />

    <!-- A layout that displays the time.  Shows time, am/pm (if 12-hour),
         and an optional line below, used for day/days of week -->
    <com.android.deskclock.DigitalClock android:id="@+id/digitalClock"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:gravity="center_vertical"
        android:layout_weight="1"
        android:orientation="vertical"
        android:paddingLeft="16dip"
        android:paddingRight="16dip">

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:baselineAligned="true">

            <TextView android:id="@+id/timeDisplay"
                android:includeFontPadding="false"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:paddingRight="6dip"
                android:textSize="28sp"
                android:textColor="?android:attr/textColorPrimary"/>

            <TextView android:id="@+id/am_pm"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textStyle="bold"
                android:textColor="?android:attr/textColorPrimary"/>

            <TextView android:id="@+id/label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:paddingLeft="8dip"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textColor="?android:attr/textColorTertiary"
                android:textStyle="bold"
                android:gravity="right"
                android:singleLine="true"/>

        </LinearLayout>

        <TextView android:id="@+id/daysOfWeek"
            android:includeFontPadding="false"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:textColor="?android:attr/textColorSecondary"/>

    </com.android.deskclock.DigitalClock>

</LinearLayout>