Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 
      3 <!--
      4   ~ Copyright (C) 2013 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 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     20              android:layout_width="match_parent"
     21              android:layout_height="0dp"
     22              android:layout_weight="1">
     23 
     24     <!-- Contact photo for primary call info -->
     25     <ImageView android:id="@+id/photo"
     26                android:layout_alignParentStart="true"
     27                android:layout_alignParentTop="true"
     28                android:layout_width="match_parent"
     29                android:layout_height="match_parent"
     30                android:gravity="top|center_horizontal"
     31                android:scaleType="centerCrop"
     32                android:contentDescription="@string/contactPhoto"
     33                android:src="@drawable/picture_unknown"/>
     34 
     35     <LinearLayout
     36             android:layout_width="match_parent"
     37             android:layout_height="wrap_content"
     38             android:orientation="vertical">
     39 
     40         <!-- "Call Banner" for primary call, the foregound or ringing call.
     41          The "call banner" is a block of info about a single call,
     42          including the contact name, phone number, call time counter,
     43          and other status info.  This info is shown as a "banner"
     44          overlaid across the top of contact photo. -->
     45         <RelativeLayout android:id="@+id/primary_call_banner"
     46             style="@style/PrimaryCallInfoPrimaryCallBanner"
     47             android:layout_width="match_parent"
     48             android:layout_height="wrap_content"
     49             android:minHeight="@dimen/call_banner_height"
     50             android:paddingStart="@dimen/call_banner_side_padding"
     51             android:paddingEnd="@dimen/call_banner_side_padding"
     52             android:paddingTop="@dimen/call_banner_top_bottom_padding"
     53             android:paddingBottom="@dimen/call_banner_top_bottom_padding"
     54             android:background="@color/incall_call_banner_background">
     55 
     56             <!-- Name (or the phone number, if we don't have a name to display). -->
     57             <TextView android:id="@+id/name"
     58                 android:layout_alignParentTop="true"
     59                 android:layout_alignParentStart="true"
     60                 android:layout_width="match_parent"
     61                 android:layout_height="wrap_content"
     62                 android:paddingEnd="@dimen/call_banner_name_number_right_padding"
     63                 android:textAppearance="?android:attr/textAppearanceMedium"
     64                 android:textColor="@color/incall_call_banner_text_color"
     65                 android:singleLine="true"
     66                 android:textAlignment="viewStart"/>
     67 
     68             <!-- Label (like "Mobile" or "Work", if present) and phone number, side by side -->
     69             <LinearLayout android:id="@+id/labelAndNumber"
     70                 android:layout_below="@id/name"
     71                 android:layout_width="wrap_content"
     72                 android:layout_height="wrap_content"
     73                 android:paddingEnd="@dimen/call_banner_name_number_right_padding"
     74                 android:orientation="horizontal">
     75                 <TextView android:id="@+id/phoneNumber"
     76                     android:layout_width="wrap_content"
     77                     android:layout_height="wrap_content"
     78                     android:textAppearance="?android:attr/textAppearanceSmall"
     79                     android:textColor="@color/incall_call_banner_text_color"
     80                     android:singleLine="true"
     81                     android:textDirection="ltr" />
     82                 <TextView android:id="@+id/label"
     83                     android:layout_width="wrap_content"
     84                     android:layout_height="wrap_content"
     85                     android:textAppearance="?android:attr/textAppearanceSmall"
     86                     android:textColor="@color/incall_call_banner_text_color"
     87                     android:textAllCaps="true"
     88                     android:singleLine="true"
     89                     android:layout_marginStart="6dp" />
     90             </LinearLayout>
     91 
     92             <!-- Elapsed time indication for a call in progress. -->
     93             <TextView android:id="@+id/elapsedTime"
     94                 android:layout_alignParentEnd="true"
     95                 android:layout_centerVertical="true"
     96                 android:layout_width="wrap_content"
     97                 android:layout_height="wrap_content"
     98                 android:textAppearance="?android:attr/textAppearanceMedium"
     99                 android:textColor="@color/incall_call_banner_text_color"
    100                 android:singleLine="true"
    101                 android:visibility="invisible" />
    102 
    103             <!-- Call type indication: a special label and/or branding
    104                  for certain kinds of calls (like "Internet call" for a SIP call.) -->
    105             <TextView android:id="@+id/callTypeLabel"
    106                 android:layout_below="@id/labelAndNumber"
    107                 android:layout_width="wrap_content"
    108                 android:layout_height="wrap_content"
    109                 android:textAppearance="?android:attr/textAppearanceSmall"
    110                 android:textColor="@color/incall_call_banner_text_color"
    111                 android:maxLines="1"
    112                 android:ellipsize="end" />
    113 
    114         </RelativeLayout>  <!-- End of call_banner -->
    115 
    116 
    117         <LinearLayout android:id="@+id/supplementary_info_container"
    118             style="@style/PrimaryCallInfoSupplementaryInfoContainer"
    119             android:layout_width="match_parent"
    120             android:layout_height="wrap_content"
    121             android:layout_gravity="center_vertical|right"
    122             android:orientation="vertical"
    123             android:background="@color/incall_secondary_info_background"
    124             android:animateLayoutChanges="true">
    125 
    126             <!-- Shown when a gateway provider is used during any outgoing call. -->
    127             <LinearLayout android:id="@+id/providerInfo"
    128                 android:layout_width="match_parent"
    129                 android:layout_height="wrap_content"
    130                 android:paddingTop="@dimen/provider_info_top_bottom_padding"
    131                 android:paddingBottom="@dimen/provider_info_top_bottom_padding"
    132                 android:paddingStart="@dimen/call_banner_side_padding"
    133                 android:paddingEnd="@dimen/call_banner_side_padding"
    134                 android:gravity="end"
    135                 android:orientation="horizontal"
    136                 android:background="@android:color/transparent"
    137                 android:visibility="gone">
    138                 <TextView android:id="@+id/providerLabel"
    139                     android:layout_width="0px"
    140                     android:layout_height="wrap_content"
    141                     android:layout_weight="6"
    142                     android:textAppearance="?android:attr/textAppearanceSmall"
    143                     android:textAllCaps="true"
    144                     android:textColor="@color/incall_call_banner_text_color"
    145                     android:singleLine="true"
    146                     android:ellipsize="marquee" />
    147                 <TextView android:id="@+id/providerAddress"
    148                     android:layout_width="0px"
    149                     android:layout_height="wrap_content"
    150                     android:layout_weight="4"
    151                     android:gravity="end"
    152                     android:paddingStart="8dp"
    153                     android:textAppearance="?android:attr/textAppearanceSmall"
    154                     android:textAllCaps="true"
    155                     android:textColor="@color/incall_call_banner_text_color"
    156                     android:singleLine="true"
    157                     android:ellipsize="middle" />
    158             </LinearLayout>
    159 
    160             <!-- The "call state label": In some states, this shows a special
    161                  indication like "Dialing" or "Incoming call" or "Call ended".
    162                  It's unused for the normal case of an active ongoing call. -->
    163             <TextView android:id="@+id/callStateLabel"
    164                       android:layout_width="match_parent"
    165                       android:layout_height="wrap_content"
    166                       android:paddingTop="@dimen/provider_info_top_bottom_padding"
    167                       android:paddingBottom="@dimen/provider_info_top_bottom_padding"
    168                       android:paddingStart="@dimen/call_banner_side_padding"
    169                       android:paddingEnd="@dimen/call_banner_side_padding"
    170                       android:gravity="end"
    171                       android:textAppearance="?android:attr/textAppearanceSmall"
    172                       android:textColor="@color/incall_call_banner_text_color"
    173                       android:textAllCaps="true"
    174                       android:background="@android:color/transparent"
    175                       android:singleLine="true"
    176                       android:ellipsize="end"/>
    177         </LinearLayout>
    178 
    179     </LinearLayout>
    180 
    181 
    182 </FrameLayout>
    183