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 <!-- "Call Banner" for primary call, the foregound or ringing call. The "call banner" is a block
     20     of info about a single call, including the contact name, phone number, call time counter, and
     21     other status info.  This info is shown as a "banner" overlaid across the top of contact photo.
     22     -->
     23 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     24         android:id="@+id/primary_call_banner"
     25         android:layout_width="match_parent"
     26         android:layout_height="match_parent"
     27         android:orientation="vertical"
     28         android:paddingStart="@dimen/call_banner_side_padding"
     29         android:paddingEnd="@dimen/call_banner_side_padding"
     30         android:clipChildren="false"
     31         android:clipToPadding="false"
     32         android:gravity="center">
     33 
     34     <LinearLayout android:id="@+id/callSubjectLayout"
     35                   android:layout_width="match_parent"
     36                   android:layout_height="wrap_content"
     37                   android:orientation="horizontal"
     38                   android:clipChildren="false"
     39                   android:clipToPadding="false">
     40 
     41         <TextView android:id="@+id/callSubject"
     42                   android:layout_width="wrap_content"
     43                   android:layout_height="wrap_content"
     44                   android:textAlignment="viewStart"
     45                   android:textAppearance="?android:attr/textAppearanceSmall"
     46                   android:textColor="@color/incall_call_banner_background_color"
     47                   android:textSize="@dimen/call_label_text_size"
     48                   android:background="@drawable/subject_bubble"
     49                   android:maxLines="2"
     50                   android:ellipsize="end"
     51                   android:singleLine="false"
     52                   android:visibility="gone" />
     53     </LinearLayout>
     54 
     55     <LinearLayout android:id="@+id/callStateButton"
     56         android:layout_width="match_parent"
     57         android:layout_height="wrap_content"
     58         android:orientation="horizontal"
     59         android:clipChildren="false"
     60         android:clipToPadding="false">
     61 
     62         <ImageView android:id="@+id/workProfileIcon"
     63             android:src="@drawable/ic_work_profile"
     64             android:layout_width="wrap_content"
     65             android:layout_height="wrap_content"
     66             android:layout_weight="0"
     67             android:layout_marginEnd="8dp"
     68             android:baselineAlignBottom="true"
     69             android:tint="@color/incall_accent_color"
     70             android:scaleType="center"
     71             android:visibility="gone" />
     72 
     73         <!-- Subscription provider or WiFi calling icon displayed to the left of the label -->
     74         <ImageView android:id="@+id/callStateIcon"
     75             android:layout_width="24dp"
     76             android:layout_height="match_parent"
     77             android:layout_marginEnd="10dp"
     78             android:tint="@color/incall_accent_color"
     79             android:alpha="0.0"
     80             android:scaleType="fitCenter"
     81             android:visibility="gone" />
     82 
     83         <ImageView android:id="@+id/videoCallIcon"
     84             android:src="@drawable/ic_toolbar_video"
     85             android:layout_width="16dp"
     86             android:layout_height="match_parent"
     87             android:layout_marginEnd="16dp"
     88             android:baselineAlignBottom="true"
     89             android:tint="@color/incall_accent_color"
     90             android:scaleType="center"
     91             android:visibility="gone" />
     92 
     93         <com.android.phone.common.widget.ResizingTextTextView
     94             xmlns:ex="http://schemas.android.com/apk/res-auto"
     95             android:id="@+id/callStateLabel"
     96             android:layout_width="match_parent"
     97             android:layout_height="wrap_content"
     98             android:textAlignment="viewStart"
     99             android:textAppearance="?android:attr/textAppearanceLarge"
    100             android:textColor="@color/incall_accent_color"
    101             android:textSize="@dimen/call_status_text_size"
    102             android:alpha="0.7"
    103             android:singleLine="true"
    104             android:gravity="start"
    105             android:ellipsize="end"
    106             ex:resizing_text_min_size="@dimen/call_status_text_min_size" />
    107 
    108     </LinearLayout>
    109 
    110     <RelativeLayout
    111         android:layout_width="match_parent"
    112         android:layout_height="wrap_content">
    113 
    114         <!-- Name (or the phone number, if we don't have a name to display). -->
    115         <com.android.phone.common.widget.ResizingTextTextView
    116             xmlns:ex="http://schemas.android.com/apk/res-auto"
    117             android:id="@+id/name"
    118             android:layout_width="match_parent"
    119             android:layout_height="wrap_content"
    120             android:layout_marginTop="-5dp"
    121             android:fontFamily="sans-serif-light"
    122             android:textAlignment="viewStart"
    123             android:textAppearance="?android:attr/textAppearanceLarge"
    124             android:textSize="@dimen/call_name_text_size"
    125             android:singleLine="true"
    126             ex:resizing_text_min_size="@dimen/call_name_text_min_size" />
    127 
    128         <!-- Contact photo for primary call info -->
    129         <ImageView android:id="@+id/photoSmall"
    130             android:layout_width="@dimen/contact_context_small_photo_size"
    131             android:layout_height="@dimen/contact_context_small_photo_size"
    132             android:layout_centerVertical="true"
    133             android:layout_alignParentEnd="true"
    134             android:scaleType="centerCrop"
    135             android:importantForAccessibility="no"
    136             android:src="@drawable/img_no_image_automirrored" />
    137     </RelativeLayout>
    138 
    139     <LinearLayout
    140         android:layout_width="match_parent"
    141         android:layout_height="wrap_content"
    142         android:orientation="horizontal"
    143         android:clipChildren="false"
    144         android:clipToPadding="false">
    145 
    146         <ImageView android:id="@+id/hdAudioIcon"
    147             android:src="@drawable/ic_hd_24dp"
    148             android:layout_width="24dp"
    149             android:layout_height="match_parent"
    150             android:layout_marginEnd="8dp"
    151             android:tint="@color/incall_call_banner_subtext_color"
    152             android:scaleType="fitCenter"
    153             android:visibility="gone" />
    154 
    155         <ImageView android:id="@+id/forwardIcon"
    156             android:src="@drawable/ic_forward_white_24dp"
    157             android:layout_width="24dp"
    158             android:layout_height="match_parent"
    159             android:layout_marginEnd="8dp"
    160             android:tint="@color/incall_call_banner_subtext_color"
    161             android:scaleType="fitCenter"
    162             android:visibility="gone" />
    163 
    164         <!-- Label (like "Mobile" or "Work", if present) and phone number, side by side -->
    165         <LinearLayout android:id="@+id/labelAndNumber"
    166             android:layout_width="wrap_content"
    167             android:layout_height="wrap_content"
    168             android:layout_weight="1"
    169             android:orientation="horizontal">
    170 
    171             <TextView android:id="@+id/label"
    172                 android:layout_width="wrap_content"
    173                 android:layout_height="wrap_content"
    174                 android:layout_weight="0"
    175                 android:textAppearance="?android:attr/textAppearanceSmall"
    176                 android:textColor="@color/incall_call_banner_subtext_color"
    177                 android:textSize="@dimen/call_label_text_size"
    178                 android:singleLine="true"
    179                 android:textDirection="ltr"
    180                 android:visibility="gone" />
    181 
    182             <TextView android:id="@+id/phoneNumber"
    183                 android:layout_width="wrap_content"
    184                 android:layout_height="wrap_content"
    185                 android:layout_weight="1"
    186                 android:layout_marginStart="6dp"
    187                 android:textAlignment="viewStart"
    188                 android:textAppearance="?android:attr/textAppearanceSmall"
    189                 android:textColor="@color/incall_call_banner_subtext_color"
    190                 android:textSize="@dimen/call_label_text_size"
    191                 android:singleLine="false"
    192                 android:visibility="gone" />
    193 
    194         </LinearLayout>
    195 
    196         <!-- Elapsed time indication for a call in progress. -->
    197         <TextView android:id="@+id/elapsedTime"
    198             android:layout_width="wrap_content"
    199             android:layout_height="wrap_content"
    200             android:layout_weight="0"
    201             android:textAlignment="viewEnd"
    202             android:textAppearance="?android:attr/textAppearanceSmall"
    203             android:textColor="@color/incall_call_banner_subtext_color"
    204             android:textSize="@dimen/call_label_text_size"
    205             android:singleLine="true"
    206             android:visibility="gone" />
    207 
    208     </LinearLayout>
    209 
    210     <!-- Call type indication: a special label and/or branding
    211      for certain kinds of calls (like "SIP call" for a SIP call.) -->
    212     <TextView android:id="@+id/callTypeLabel"
    213         android:layout_width="wrap_content"
    214         android:layout_height="wrap_content"
    215         android:textAppearance="?android:attr/textAppearanceSmall"
    216         android:textColor="@color/incall_call_banner_text_color"
    217         android:maxLines="1"
    218         android:ellipsize="end"
    219         android:visibility="gone" />
    220 
    221 </LinearLayout> <!-- End of call_banner -->
    222