• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2013 The Android Open Source Project
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License");
6  ~ you may not use this file except in compliance with the License.
7  ~ You may obtain a copy of the License at
8  ~
9  ~      http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License
16  -->
17
18<!-- In-call onscreen touch UI elements, used on some platforms.
19
20     This layout is a fullscreen overlay, drawn on top of the
21     non-touch-sensitive parts of the in-call UI (i.e. the call card).
22
23     The top-level View here is a InCallTouchUi (FrameLayout) with 2 children:
24       (1) inCallControls: the widgets visible while a regular call (or calls) is in progress
25       (2) incomingCallWidget: the UI displayed while an incoming call is ringing
26     In usual cases, one of these is visible at any given moment.
27     One exception is when incomingCallWidget is fading-out. At that moment, we show
28     inCallControls beneath incomingCallWidget for smoother transition.
29     -->
30
31<!-- Main cluster of onscreen buttons on the lower part of the screen. -->
32<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
33    android:id="@+id/bottomButtons"
34    android:orientation="vertical"
35    android:layout_width="match_parent"
36    android:layout_margin="0dp"
37    android:padding="0dp"
38    android:layout_height="wrap_content"
39    android:layout_alignParentBottom="true"
40    android:animateLayoutChanges="true"
41    android:visibility="invisible" >
42
43    <LinearLayout
44        android:orientation="horizontal"
45        android:layout_width="match_parent"
46        android:layout_height="wrap_content"
47        android:paddingStart="@dimen/button_cluster_horizontal_padding"
48        android:paddingEnd="@dimen/button_cluster_horizontal_padding"
49        android:background="@color/button_background_color"
50        android:gravity="bottom|center_horizontal">
51
52        <!-- This row only ever shows either 4 or 5 buttons. This may depend on whether the device
53             supports "Hold" (i.e. 4 buttons on CDMA devices, 5 buttons on GSM devices.) or whether
54             it is in a video call.
55
56             There are a couple of *pairs* of buttons that share a single "slot", namely Hold/Swap
57             and Add/Merge.  For these, the code in InCallTouchUi is responsible for making sure
58             that at any point exactly one of the pair is VISIBLE and the other is GONE.
59
60             If there are more than 5 buttons eligible to be shown, the presenter is responsible for
61             collapsing those options into an overflow menu, which appears as one of the buttons
62             in the row instead. -->
63
64        <!-- FAR LEFT SLOT ===================================================================== -->
65
66        <!-- "Audio mode". this is a multi-mode button that can behave either like a simple
67             "compound button" with two states *or* like an action button that brings up a popup
68             menu; see btn_compound_audio.xml and CallButtonFragment.updateAudioButtons(). -->
69        <ImageButton android:id="@+id/audioButton"
70            style="@style/InCallCompoundButton"
71            android:background="@drawable/btn_compound_audio"
72            android:contentDescription="@string/onscreenAudioText" />
73
74        <!-- "Change to audio call" for video calls. -->
75        <ImageButton android:id="@+id/changeToVoiceButton"
76            style="@style/InCallButton"
77            android:background="@drawable/btn_change_to_voice"
78            android:contentDescription="@string/onscreenChangeToVoiceText"
79            android:visibility="gone" />
80
81        <!-- MIDDLE LEFT SLOT ================================================================== -->
82
83        <!-- "Mute" -->
84        <ImageButton android:id="@+id/muteButton"
85            style="@style/InCallCompoundButton"
86            android:background="@drawable/btn_compound_mute"
87            android:contentDescription="@string/onscreenMuteText" />
88
89        <!-- CENTER SLOT ======================================================================= -->
90
91        <!-- "Dialpad" -->
92        <ImageButton android:id="@+id/dialpadButton"
93            style="@style/InCallCompoundButton"
94            android:background="@drawable/btn_compound_dialpad"
95            android:contentDescription="@string/onscreenShowDialpadText" />
96
97        <!-- MIDDLE RIGHT SLOT ================================================================= -->
98
99        <!-- This slot is either "Hold" or "Swap", depending on the state of the call. One or the
100             other of these must always be set to GONE. -->
101
102        <!-- "Hold" -->
103        <ImageButton android:id="@+id/holdButton"
104            style="@style/InCallCompoundButton"
105            android:background="@drawable/btn_compound_hold"
106            android:contentDescription="@string/onscreenHoldText" />
107
108        <!-- "Swap" (or "Manage calls" in some CDMA states) -->
109        <ImageButton android:id="@+id/swapButton"
110            style="@style/InCallButton"
111            android:background="@drawable/btn_swap"
112            android:contentDescription="@string/onscreenSwapCallsText"
113            android:visibility="gone" />
114
115        <!-- "Change to video call" -->
116        <ImageButton android:id="@+id/changeToVideoButton"
117            style="@style/InCallButton"
118            android:background="@drawable/btn_change_to_video"
119            android:contentDescription="@string/onscreenVideoCallText"
120            android:visibility="gone" />
121
122        <!-- "Switch camera" for video calls. -->
123        <ImageButton android:id="@+id/switchCameraButton"
124            style="@style/InCallCompoundButton"
125            android:background="@drawable/btn_compound_video_switch"
126            android:contentDescription="@string/onscreenSwitchCameraText"
127            android:visibility="gone" />
128
129        <!-- FAR RIGHT SLOT ==================================================================== -->
130
131        <!-- This slot is either "Add" or "Merge", depending on the state of the call.  One or the
132             other of these must always be set to GONE. -->
133
134        <!-- "Add Call" -->
135        <ImageButton android:id="@+id/addButton"
136            style="@style/InCallButton"
137            android:background="@drawable/btn_add"
138            android:contentDescription="@string/onscreenAddCallText"
139            android:visibility="gone" />
140
141        <!-- "Merge calls". This button is used only on GSM devices, where we know that "Add" and
142             "Merge" are never available at the same time. The "Merge" button for CDMA devices is
143             "cdmaMergeButton" above. -->
144        <ImageButton android:id="@+id/mergeButton"
145            style="@style/InCallButton"
146            android:background="@drawable/btn_merge"
147            android:contentDescription="@string/onscreenMergeCallsText"
148            android:visibility="gone" />
149
150        <!-- "Switch camera" for video calls. -->
151        <ImageButton android:id="@+id/pauseVideoButton"
152            style="@style/InCallCompoundButton"
153            android:background="@drawable/btn_compound_video_off"
154            android:contentDescription="@string/onscreenPauseVideoText"
155            android:visibility="gone" />
156
157        <!-- "Overflow" -->
158        <ImageButton android:id="@+id/overflowButton"
159            style="@style/InCallButton"
160            android:background="@drawable/btn_overflow"
161            android:contentDescription="@string/onscreenOverflowText"
162            android:visibility="gone" />
163
164    </LinearLayout>
165
166</LinearLayout>
167