diff options
author | Chiao Cheng <chiaocheng@google.com> | 2013-07-19 19:10:55 -0700 |
---|---|---|
committer | Chiao Cheng <chiaocheng@google.com> | 2013-07-22 11:39:09 -0700 |
commit | e331d604d5ab345b06976c0ff7a930930f6b9e41 (patch) | |
tree | a09f34a37d63c21b870592666575dad919a21824 /res/layout/call_button_fragment.xml | |
parent | ed6adb062b06a0ad4d7bd2c1d3ea5d04c3370a0f (diff) | |
download | packages_apps_InCallUI-e331d604d5ab345b06976c0ff7a930930f6b9e41.tar.gz packages_apps_InCallUI-e331d604d5ab345b06976c0ff7a930930f6b9e41.tar.bz2 packages_apps_InCallUI-e331d604d5ab345b06976c0ff7a930930f6b9e41.zip |
Adding call card and buttons to UI.
- Created a fragment for call card and a fragment for UI.
- Adding corresponding button images.
Change-Id: I5facacd3a4346ab9d9ec2a67a2742dc27dbf5583
Diffstat (limited to 'res/layout/call_button_fragment.xml')
-rw-r--r-- | res/layout/call_button_fragment.xml | 178 |
1 files changed, 178 insertions, 0 deletions
diff --git a/res/layout/call_button_fragment.xml b/res/layout/call_button_fragment.xml new file mode 100644 index 00000000..1c2e7c7b --- /dev/null +++ b/res/layout/call_button_fragment.xml @@ -0,0 +1,178 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2013 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 + --> + +<!-- In-call onscreen touch UI elements, used on some platforms. + + This layout is a fullscreen overlay, drawn on top of the + non-touch-sensitive parts of the in-call UI (i.e. the call card). + + The top-level View here is a InCallTouchUi (FrameLayout) with 2 children: + (1) inCallControls: the widgets visible while a regular call (or calls) is in progress + (2) incomingCallWidget: the UI displayed while an incoming call is ringing + In usual cases, one of these is visible at any given moment. + One exception is when incomingCallWidget is fading-out. At that moment, we show + inCallControls beneath incomingCallWidget for smoother transition. + --> + +<!-- Main cluster of onscreen buttons on the lower part of the screen. --> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/bottomButtons" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true"> + + <!-- Row 1, the "extra button row": A couple of relatively rare + buttons used only in certain call states. + Most of the time this whole row is GONE. + For now, at least, there's only ever one button visible here + at a time, so this can be a simple FrameLayout. --> + <ViewStub android:id="@+id/extraButtonRow" + android:layout="@layout/extra_button_row" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> + + <!-- Row 2: The "End call" button. --> + <ImageButton android:id="@+id/endButton" + style="@style/InCallEndButton" + android:layout_width="match_parent" + android:src="@drawable/ic_dial_end_call" + android:background="@drawable/end_call_background" + android:contentDescription="@string/onscreenEndCallText"/> + + <!-- Row 3: The main batch of in-call buttons: + Dialpad / Audio mode / Mute / Hold / Add call + Visible in all states except while an incoming call is + ringing. --> + <LinearLayout + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/dialpad_background" + android:paddingStart="@dimen/button_cluster_side_padding" + android:paddingEnd="@dimen/button_cluster_side_padding" + > + + <!-- This row has either 4 or 5 buttons, depending on + whether the device supports "Hold" (i.e. 4 buttons on + CDMA devices, 5 buttons on GSM devices.) The buttons + are interspersed with 'layout_weight="1"' placeholder + views so that they'll be spaced evenly in both cases. + + But note there are a couple of *pairs* of buttons that share a + single "slot", namely Hold/Swap and Add/Merge. For these, the + code in InCallTouchUi is responsible for making sure that at any + point exactly one of the pair is VISIBLE and the other is + GONE. --> + + <!-- Separator between left padding and 1st button --> + <View style="@style/VerticalSeparator"/> + + <!-- "Dialpad" --> + <!-- This is a "compound button": it has checked and unchecked states. --> + <ToggleButton android:id="@+id/dialpadButton" + style="@style/InCallCompoundButton" + android:background="@drawable/btn_compound_dialpad" + android:contentDescription="@string/onscreenShowDialpadText" + /> + + <!-- Separator between 1st and 2nd button --> + <View style="@style/VerticalSeparator"/> + + <!-- "Audio mode" --> + <!-- This is a multi-mode button that can behave either like a + simple "compound button" with two states *or* like an + action button that brings up a popup menu; see + btn_compound_audio.xml and InCallTouchUi.updateAudioButton() + for the full details. --> + <ToggleButton android:id="@+id/audioButton" + style="@style/InCallCompoundButton" + android:background="@drawable/btn_compound_audio" + android:contentDescription="@string/onscreenAudioText" + /> + + <!-- Separator between 2nd and 3rd button --> + <View style="@style/VerticalSeparator"/> + + <!-- "Mute" --> + <!-- This is a "compound button": it has checked and unchecked states. --> + <ToggleButton android:id="@+id/muteButton" + style="@style/InCallCompoundButton" + android:background="@drawable/btn_compound_mute" + android:contentDescription="@string/onscreenMuteText" + /> + + <!-- Separator between 3rd and 4th button --> + <View style="@style/VerticalSeparator"/> + + <!-- This slot is either "Hold" or "Swap", depending on + the state of the call. One or the other of these + must always be set to GONE. --> + <!-- "Hold" --> + <!-- This is a "compound button": it has checked and unchecked states. --> + <ToggleButton android:id="@+id/holdButton" + style="@style/InCallCompoundButton" + android:background="@drawable/btn_compound_hold" + android:contentDescription="@string/onscreenHoldText" + /> + <!-- "Swap" (or "Manage calls" in some CDMA states) --> + <ImageButton android:id="@+id/swapButton" + style="@style/InCallButton" + android:src="@drawable/ic_incall_switch_holo_dark" + android:contentDescription="@string/onscreenSwapCallsText" + /> + + <!-- Separator between 4th and 5th button (if 5th exists) --> + <View android:id="@+id/holdSwapSpacer" + style="@style/VerticalSeparator"/> + + <!-- This slot is either "Add" or "Merge", depending on + the state of the call. One or the other of these + must always be set to GONE. --> + <!-- "Add Call" --> + <ImageButton android:id="@+id/addButton" + style="@style/InCallButton" + android:src="@drawable/ic_add_contact_holo_dark" + android:contentDescription="@string/onscreenAddCallText" + /> + <!-- "Merge calls" --> + <!-- This button is used only on GSM devices, where we know + that "Add" and "Merge" are never available at the same time. + The "Merge" button for CDMA devices is "cdmaMergeButton" above. --> + <ImageButton android:id="@+id/mergeButton" + style="@style/InCallButton" + android:src="@drawable/ic_merge_holo_dark" + android:contentDescription="@string/onscreenMergeCallsText" + /> + + <!-- Separator between 5th and 6th button (if 6th exists) --> + <View android:id="@+id/videoCallSpacer" + style="@style/VerticalSeparator"/> + + <!-- This button is use for converting an ongoing call into a video call. --> + <ImageButton android:id="@+id/videoCallButton" + style="@style/InCallButton" + android:src="@drawable/ic_videocall_holo_dark" + android:contentDescription="@string/onscreenVideoCallText" + /> + + <!-- Separator between 4th (or 5th) button and right padding --> + <View style="@style/VerticalSeparator"/> + + </LinearLayout> + +</LinearLayout> |