summaryrefslogtreecommitdiffstats
path: root/phone/res/layout/otacall_card.xml
blob: 3125892116e2e57bc241b82812b0c48da6f3f552 (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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?xml version="1.0" encoding="utf-8"?>
<!-- Outer layout for all OTA elements. This contains:
     (1) Certain call card elements used for the other various OTA screens
     (2) Activate/Cancel buttons specific to the OTA Activate screen
     (3) Buttons used on the listen/progress screens
     (4) Button used for the final success/failure screen -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:gravity="center_horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

    <!-- (1) The ota call card shared widgets -->
    <ScrollView android:layout_width="match_parent"
                android:layout_height="wrap_content">

        <LinearLayout android:id="@+id/otaBase"
                      android:orientation="vertical"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content" >

            <TextView android:id="@+id/otaTitle"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textAppearance="@style/ccOtaWizardTitle"
                      android:text="@string/ota_title_activate"
            />

            <View
                      android:layout_width="wrap_content"
                      android:layout_height="1dip"
                      android:layout_gravity="center"
                      android:background="@drawable/green_divider"
                      android:layout_marginTop="14dip"
                      android:focusable="false"
                      android:clickable="false"
            />

            <TextView android:id="@+id/otaActivate"
                      android:layout_marginTop="@dimen/otaactivate_layout_marginTop"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textAppearance="@style/ccOtaTextPrimary"
                      android:visibility="gone"
                      android:text="@string/ota_touch_activate"
                      />

            <ScrollView android:id="@+id/otaListenProgressContainer"
                android:layout_marginTop="@dimen/otalistenprogress_layout_marginTop"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:visibility="gone">
                <TextView android:id="@+id/otaListenProgress"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textAppearance="@style/ccOtaTextPrimary"
                 />
            </ScrollView>

            <ProgressBar android:id="@+android:id/progress_large"
                         style="?android:attr/progressBarStyleHorizontal"
                         android:layout_marginTop="20dip"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:visibility="gone"/>

            <TextView android:id="@+id/otaSuccessFailStatus"
                      android:gravity="left"
                      android:layout_marginTop="@dimen/otasuccessfail_layout_marginTop"
                      android:layout_marginLeft="5dip"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textAppearance="@style/ccOtaTextPrimary"
                      android:visibility="gone"
                      />

            <!-- DTMF Dialer section -->
            <com.android.phone2.DTMFTwelveKeyDialerView
                    xmlns:android="http://schemas.android.com/apk/res/android"
                    android:id="@+id/otaDtmfDialer"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_marginTop="1dip"
                    android:visibility="gone" >

                <!-- Note there's no "dtmfDialerField" EditText here;
                     in the OTA UI there's no visible "digits" display
                     attached to the dialpad. -->

                <!-- Keypad section -->
                <include layout="@layout/dialpad" />

            </com.android.phone2.DTMFTwelveKeyDialerView>

        </LinearLayout>

    </ScrollView>

    <View
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1"
    />

    <!-- "Speaker" button -->
    <ToggleButton android:id="@+id/otaSpeakerButton"
              android:layout_gravity="center"
              android:textOn="@string/ota_speaker"
              android:textOff="@string/ota_speaker"
              style="@style/ccOtaButton" />

    <!-- (2) Activate/cancel buttons -->
    <RelativeLayout android:id="@+id/callCardOtaActivate"
                    android:visibility="gone"
                    style="@style/ccOtaButtonBar" >

        <!-- "Activate" button -->
        <Button android:id="@+id/otaActivateButton"
                android:text="@string/ota_activate"
                style="@style/ccOtaNextButton" />

        <!-- "Skip" button -->   <!--  TODO: borrowing another button's label for now because I missed the localization deadline for adding a @string/ota_skip -->
        <Button android:id="@+id/otaSkipButton"
                android:text="@string/ota_skip_activation_dialog_skip_label"
                style="@style/ccOtaSkipButton" />

    </RelativeLayout>

    <!-- (3) OTA listen/progress buttons -->
    <RelativeLayout android:id="@+id/callCardOtaListenProgress"
                    android:visibility="gone"
                    style="@style/ccOtaButtonBar" >

        <!-- "End" button -->
        <Button android:id="@+id/otaEndButton"
                android:text="@string/ota_call_end"
                android:drawableLeft="@drawable/ic_btn_back"
                android:drawablePadding="3dip"
                style="@style/ccOtaSkipButton" />
    </RelativeLayout>

    <!-- (4) OTA Success/Failure button -->
    <RelativeLayout android:id="@+id/callCardOtaFailOrSuccessful"
                    android:visibility="gone"
                    style="@style/ccOtaButtonBar" >

        <!-- "Next" button -->
        <Button android:id="@+id/otaNextButton"
                android:text="@string/ota_next"
                android:drawableRight="@drawable/ic_btn_next"
                android:drawablePadding="10dip"
                style="@style/ccOtaNextButton" />

        <!-- "Try Again" button -->
        <Button android:id="@+id/otaTryAgainButton"
                android:text="@string/ota_try_again"
                style="@style/ccOtaSkipButton" />
    </RelativeLayout>
</LinearLayout>