Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 
      3 <!--
      4   ~ Copyright (C) 2014 The Android Open Source Project
      5   ~
      6   ~ Licensed under the Apache License, Version 2.0 (the "License");
      7   ~ you may not use this file except in compliance with the License.
      8   ~ You may obtain a copy of the License at
      9   ~
     10   ~      http://www.apache.org/licenses/LICENSE-2.0
     11   ~
     12   ~ Unless required by applicable law or agreed to in writing, software
     13   ~ distributed under the License is distributed on an "AS IS" BASIS,
     14   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15   ~ See the License for the specific language governing permissions and
     16   ~ limitations under the License
     17   -->
     18 
     19 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     20     android:layout_width="match_parent"
     21     android:layout_height="match_parent">
     22 
     23     <!-- The main content of the CallCard is either one or two "call info"
     24          blocks, depending on whether one or two lines are in use.
     25 
     26          The call_info blocks are stacked vertically inside a CallCard (LinearLayout),
     27          each with layout_weight="1".  If only one line is in use (i.e. the
     28          common case) then the 2nd call info will be GONE and thus the 1st one
     29          will expand to fill the full height of the CallCard. -->
     30 
     31     <!-- Primary "call card" block, for the foreground call. -->
     32     <LinearLayout
     33         android:id="@+id/primary_call_info_container"
     34         android:layout_width="match_parent"
     35         android:layout_height="wrap_content"
     36         android:orientation="vertical"
     37         android:elevation="@dimen/primary_call_elevation"
     38         android:layout_centerHorizontal="true"
     39         android:background="@color/incall_call_banner_background_color"
     40         android:paddingTop="@dimen/call_banner_primary_call_container_top_padding"
     41         android:clipChildren="false"
     42         android:clipToPadding="false">
     43 
     44         <include layout="@layout/primary_call_info" />
     45 
     46         <fragment android:name="com.android.incallui.CallButtonFragment"
     47             android:id="@+id/callButtonFragment"
     48             android:layout_width="match_parent"
     49             android:layout_height="wrap_content" />
     50 
     51         <TextView android:id="@+id/connectionServiceMessage"
     52             android:layout_width="match_parent"
     53             android:layout_height="wrap_content"
     54             android:textAppearance="?android:attr/textAppearanceMedium"
     55             android:visibility="gone"
     56             android:padding="@dimen/call_banner_side_padding"
     57             android:background="@android:color/white" />
     58 
     59     </LinearLayout>
     60 
     61     <!-- Contact photo for primary call info -->
     62     <ImageView android:id="@+id/photo"
     63         android:layout_below="@id/primary_call_info_container"
     64         android:layout_width="match_parent"
     65         android:layout_height="match_parent"
     66         android:layout_gravity="center_vertical"
     67         android:gravity="top|center_horizontal"
     68         android:scaleType="centerCrop"
     69         android:contentDescription="@string/contactPhoto"
     70         android:background="@android:color/white"
     71         android:src="@drawable/img_no_image_automirrored" />
     72 
     73     <!-- Progress spinner, useful for indicating pending operations such as upgrade to video. -->
     74     <FrameLayout
     75         android:id="@+id/progressSpinner"
     76         android:layout_below="@id/primary_call_info_container"
     77         android:background="#63000000"
     78         android:layout_width="fill_parent"
     79         android:layout_height="fill_parent"
     80         android:layout_centerHorizontal="true"
     81         android:layout_centerVertical="true"
     82         android:visibility="gone">
     83 
     84         <ProgressBar
     85             android:id="@+id/progress_bar"
     86             style="@android:style/Widget.Material.ProgressBar"
     87             android:layout_gravity="center"
     88             android:layout_width="48dp"
     89             android:layout_height="48dp"
     90             android:indeterminate="true" />
     91     </FrameLayout>
     92 
     93     <!-- Secondary "Call info" block, for the background ("on hold") call. -->
     94     <include layout="@layout/secondary_call_info" />
     95 
     96     <include layout="@layout/manage_conference_call_button"
     97         android:layout_width="match_parent"
     98         android:layout_height="wrap_content"
     99         android:layout_alignTop="@id/photo" />
    100 
    101     <!-- Placeholder for the dialpad which is replaced with the dialpad fragment when shown. -->
    102     <FrameLayout
    103         android:id="@+id/dialpadFragmentContainer"
    104         android:layout_below="@id/primary_call_info_container"
    105         android:layout_gravity="bottom|center_horizontal"
    106         android:layout_alignParentBottom="true"
    107         android:layout_width="match_parent"
    108         android:layout_height="match_parent"
    109         android:elevation="@dimen/dialpad_elevation" />
    110 
    111     <fragment android:name="com.android.incallui.AnswerFragment"
    112         android:id="@+id/answerFragment"
    113         android:layout_below="@id/primary_call_info_container"
    114         android:layout_width="match_parent"
    115         android:layout_height="match_parent"
    116         android:layout_gravity="bottom|center_horizontal"
    117         android:layout_marginBottom="@dimen/glowpadview_margin_bottom"
    118         android:visibility="gone" />
    119 
    120     <FrameLayout
    121         android:id="@+id/floating_end_call_action_button_container"
    122         android:layout_width="@dimen/end_call_floating_action_button_diameter"
    123         android:layout_height="@dimen/end_call_floating_action_button_diameter"
    124         android:background="@drawable/fab_red"
    125         android:layout_centerHorizontal="true"
    126         android:layout_marginBottom="@dimen/end_call_button_margin_bottom"
    127         android:layout_alignParentBottom="true" >
    128 
    129         <ImageButton android:id="@+id/floating_end_call_action_button"
    130             android:layout_width="match_parent"
    131             android:layout_height="match_parent"
    132             android:background="@drawable/end_call_background"
    133             android:src="@drawable/fab_ic_end_call"
    134             android:scaleType="center"
    135             android:contentDescription="@string/onscreenEndCallText" />
    136 
    137     </FrameLayout>
    138 
    139 </RelativeLayout>
    140