Home | History | Annotate | Download | only in layout-land
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2012 The Android Open Source Project
      3 
      4      Licensed under the Apache License, Version 2.0 (the "License");
      5      you may not use this file except in compliance with the License.
      6      You may obtain a copy of the License at
      7 
      8           http://www.apache.org/licenses/LICENSE-2.0
      9 
     10      Unless required by applicable law or agreed to in writing, software
     11      distributed under the License is distributed on an "AS IS" BASIS,
     12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13      See the License for the specific language governing permissions and
     14      limitations under the License.
     15 -->
     16 
     17 <!-- In-call onscreen touch UI elements, used on some platforms.
     18 
     19      This layout is a fullscreen overlay, drawn on top of the
     20      non-touch-sensitive parts of the in-call UI (i.e. the call card).
     21 
     22      The top-level View here is a InCallTouchUi (FrameLayout) with 2 children:
     23        (1) inCallControls: the widgets visible while a regular call (or calls) is in progress
     24        (2) incomingCallWidget: the UI displayed while an incoming call is ringing
     25      In usual cases, one of these is visible at any given moment.
     26      One exception is when incomingCallWidget is fading-out. At that moment, we show
     27      inCallControls beneath incomingCallWidget for smoother transition.
     28      -->
     29 <com.android.phone.InCallTouchUi xmlns:android="http://schemas.android.com/apk/res/android"
     30     xmlns:prvandroid="http://schemas.android.com/apk/prv/res/android"
     31     android:id="@+id/inCallTouchUi"
     32     android:layout_width="match_parent"
     33     android:layout_height="match_parent">
     34 
     35     <!--
     36         (1) inCallControls: the widgets visible while a regular call
     37         (or calls) is in progress
     38     -->
     39     <LinearLayout
     40         android:id="@+id/inCallControls"
     41         android:layout_width="match_parent"
     42         android:layout_height="match_parent"
     43         android:visibility="gone">
     44 
     45         <!-- DTMF dialpad shown in the left part of the screen.
     46              This is wrapped in a FrameLayout because otherwise the ViewStub has no width,
     47              causing the other buttons to span the full width of the screen -->
     48         <FrameLayout
     49             android:layout_width="0dp"
     50             android:layout_weight="3"
     51             android:layout_height="match_parent">
     52             <ViewStub
     53                 android:id="@+id/dtmf_twelve_key_dialer_stub"
     54                 android:layout="@layout/dtmf_twelve_key_dialer_view"
     55                 android:layout_width="match_parent"
     56                 android:layout_height="match_parent" />
     57 
     58             <!-- The "extra button row": Rare button used for statues such as conference
     59                  calls (GSM). Refer to layout(portrait)/incall_touch_ui for more details.
     60                  When shown, this extra button row hovers over the call card, just above
     61                  the primary_call_banner of layout-land/primary_call_info.
     62                  I believe, since this is the CDMA layout, that the button might not be shown. -->
     63             <ViewStub
     64                 android:id="@+id/extraButtonRow"
     65                 android:layout_gravity="bottom"
     66                 android:layout_marginBottom="@dimen/call_banner_height"
     67                 android:layout="@layout/extra_button_row"
     68                 android:layout_width="match_parent"
     69                 android:layout_height="wrap_content" />
     70         </FrameLayout>
     71 
     72         <!-- Note: This center margin is repeated in layout-land/incall_screen -->
     73         <View
     74             android:layout_width="@dimen/dialpad_center_margin"
     75             android:layout_height="match_parent"
     76             android:background="#66000000" />
     77 
     78         <!-- Cluster of buttons on the right part of the screen.
     79              It is named id/bottomButtons from the naming when in portrait layout. -->
     80         <LinearLayout
     81             android:id="@+id/bottomButtons"
     82             android:background="@drawable/dialpad_background"
     83             android:orientation="vertical"
     84             android:layout_width="0dp"
     85             android:layout_weight="2"
     86             android:layout_height="match_parent">
     87 
     88             <!-- This slot is either "Hold" or "Swap", depending on
     89                  the state of the call.   One or the other of these
     90                  must always be set to GONE. -->
     91             <!-- "Hold" -->
     92             <!-- This is a "compound button": it has checked and unchecked states. -->
     93             <ToggleButton
     94                 android:id="@+id/holdButton"
     95                 android:layout_height="0dp"
     96                 android:layout_weight="1"
     97                 android:layout_width="match_parent"
     98                 style="@style/InCallCompoundButton"
     99                 android:background="@drawable/btn_compound_hold"
    100                 android:contentDescription="@string/onscreenHoldText" />
    101             <!-- "Swap" (or "Manage calls" in some CDMA states) -->
    102             <ImageButton
    103                 android:id="@+id/swapButton"
    104                 android:layout_height="0dp"
    105                 android:layout_weight="1"
    106                 android:layout_width="match_parent"
    107                 style="@style/InCallButton"
    108                 android:src="@drawable/ic_incall_switch_holo_dark"
    109                 android:contentDescription="@string/onscreenSwapCallsText" />
    110 
    111 
    112             <View
    113                 android:id="@+id/holdSwapSpacer"
    114                 android:layout_height="@dimen/dialpad_button_margin"
    115                 android:layout_width="match_parent"
    116                 android:background="#66000000" />
    117 
    118             <LinearLayout
    119                 android:layout_height="0dp"
    120                 android:layout_weight="1"
    121                 android:layout_width="match_parent">
    122                 <ToggleButton
    123                     android:id="@+id/muteButton"
    124                     android:layout_width="0dp"
    125                     android:layout_weight="1"
    126                     android:layout_height="match_parent"
    127                     style="@style/InCallCompoundButton"
    128                     android:background="@drawable/btn_compound_mute"
    129                     android:contentDescription="@string/onscreenMuteText" />
    130                 <View
    131                     android:layout_width="@dimen/dialpad_button_margin"
    132                     android:layout_height="match_parent"
    133                     android:background="#66000000" />
    134                 <!-- "Audio mode" -->
    135                 <!-- This is a multi-mode button that can behave either like a
    136                      simple "compound button" with two states *or* like an
    137                      action button that brings up a popup menu; see
    138                      btn_compound_audio.xml and InCallTouchUi.updateAudioButton()
    139                      for the full details. -->
    140                 <ToggleButton
    141                     android:id="@+id/audioButton"
    142                     android:layout_width="0dp"
    143                     android:layout_weight="1"
    144                     android:layout_height="match_parent"
    145                     style="@style/InCallCompoundButton"
    146                     android:background="@drawable/btn_compound_audio"
    147                     android:contentDescription="@string/onscreenAudioText" />
    148             </LinearLayout>
    149 
    150             <View
    151                 android:layout_height="@dimen/dialpad_button_margin"
    152                 android:layout_width="match_parent"
    153                 android:background="#66000000" />
    154 
    155             <LinearLayout
    156                 android:layout_height="0dp"
    157                 android:layout_weight="1"
    158                 android:layout_width="match_parent">
    159                 <ToggleButton
    160                     android:id="@+id/dialpadButton"
    161                     android:layout_width="0dp"
    162                     android:layout_weight="1"
    163                     android:layout_height="match_parent"
    164                     style="@style/InCallCompoundButton"
    165                     android:background="@drawable/btn_compound_dialpad"
    166                     android:contentDescription="@string/onscreenShowDialpadText" />
    167                 <View
    168                     android:layout_width="@dimen/dialpad_button_margin"
    169                     android:layout_height="match_parent"
    170                     android:background="#66000000" />
    171                 <!-- This slot is either "Add" or "Merge", depending on
    172                      the state of the call.  One or the other of these
    173                      must always be set to GONE. -->
    174                 <!-- "Add Call" -->
    175                 <ImageButton
    176                     android:id="@+id/addButton"
    177                     android:layout_width="0dp"
    178                     android:layout_weight="1"
    179                     android:layout_height="match_parent"
    180                     style="@style/InCallButton"
    181                     android:src="@drawable/ic_add_contact_holo_dark"
    182                     android:contentDescription="@string/onscreenAddCallText" />
    183                 <!-- "Merge calls" -->
    184                 <!-- This button is used only on GSM devices, where we know
    185                      that "Add" and "Merge" are never available at the same time.
    186                      The "Merge" button for CDMA devices is "cdmaMergeButton" above. -->
    187                 <ImageButton
    188                     android:id="@+id/mergeButton"
    189                     android:layout_width="0dp"
    190                     android:layout_weight="1"
    191                     android:layout_height="match_parent"
    192                     style="@style/InCallButton"
    193                     android:src="@drawable/ic_merge_holo_dark"
    194                     android:contentDescription="@string/onscreenMergeCallsText" />
    195             </LinearLayout>
    196 
    197             <View
    198                 android:layout_height="@dimen/dialpad_button_margin"
    199                 android:layout_width="match_parent"
    200                 android:background="#66000000" />
    201             <ImageButton
    202                 android:id="@+id/endButton"
    203                 android:layout_height="@dimen/in_call_end_button_height"
    204                 android:layout_width="match_parent"
    205                 android:src="@drawable/ic_dial_end_call"
    206                 android:background="@drawable/end_call_background"
    207                 android:contentDescription="@string/onscreenEndCallText" />
    208         </LinearLayout>
    209     </LinearLayout>
    210 
    211     <!--
    212         (2) incomingCallWidget: the UI displayed while an incoming call is ringing.
    213             See InCallTouchUi.showIncomingCallWidget().
    214 
    215             Layout notes:
    216             - Use an opaque black background since we need to cover up
    217               a bit of the bottom of the contact photo
    218             - The verticalOffset value gets us a little extra space above
    219               the topmost "Respond by SMS" icon
    220             - The negative layout_marginBottom shifts us slightly downward;
    221               we're already aligned with the bottom of the screen, but we
    222               don't have an icon in the downward direction so the whole
    223               bottom area of this widget is just wasted space.
    224     -->
    225     <com.android.internal.widget.multiwaveview.GlowPadView
    226         android:id="@+id/incomingCallWidget"
    227         android:layout_width="wrap_content"
    228         android:layout_height="match_parent"
    229         android:layout_gravity="right"
    230         android:background="@android:color/black"
    231         android:visibility="gone"
    232         android:gravity="top"
    233 
    234         prvandroid:targetDrawables="@array/incoming_call_widget_3way_targets"
    235         prvandroid:targetDescriptions="@array/incoming_call_widget_3way_target_descriptions"
    236         prvandroid:directionDescriptions="@array/incoming_call_widget_3way_direction_descriptions"
    237         prvandroid:handleDrawable="@drawable/ic_in_call_touch_handle"
    238         prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
    239         prvandroid:outerRadius="@*android:dimen/glowpadview_target_placement_radius"
    240         prvandroid:outerRingDrawable="@*android:drawable/ic_lockscreen_outerring"
    241         prvandroid:snapMargin="@*android:dimen/glowpadview_snap_margin"
    242         prvandroid:vibrationDuration="20"
    243         prvandroid:feedbackCount="1"
    244         prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius"
    245         prvandroid:pointDrawable="@*android:drawable/ic_lockscreen_glowdot"
    246         />
    247 
    248 </com.android.phone.InCallTouchUi>
    249