Android4.1电话呼叫界面布局设计:

Android4.1电话呼叫界面布局设计:

  1. <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"  
  2.     android:id="@+id/incall_screen"  
  3.     android:layout_width="match_parent"  
  4.     android:layout_height="match_parent">  
  5.     <com.android.phone.InCallContactPhoto android:id="@+id/photo"  
  6.                    android:layout_alignParentTop="true"  
  7.                    android:layout_width="match_parent"  
  8.                    android:layout_height="match_parent"  
  9.                    android:gravity="top|center_horizontal"  
  10.                    android:scaleType="centerCrop"  
  11.                    android:contentDescription="@string/contactPhoto"  
  12.                    android:background="@drawable/picture_unknown"/>  
  13.     <ImageView android:id="@+id/insetPhoto"  
  14.             android:layout_width="@dimen/contact_photo_inset_width"  
  15.             android:layout_height="@dimen/contact_photo_inset_height"  
  16.             android:scaleType="centerCrop"  
  17.             android:layout_marginLeft="@dimen/contact_photo_inset_left_margin"/>  
  18.     <RelativeLayout  
  19.         android:layout_width="match_parent"  
  20.         android:layout_height="wrap_content" >  
  21.         <RelativeLayout  
  22.             android:id="@+id/inCallPanel"  
  23.             android:layout_width="match_parent"  
  24.             android:layout_height="wrap_content"  
  25.             android:layout_alignTop="@id/inCallTouchUi" >  
  26.             <com.android.phone.CallCard  
  27.                 android:id="@+id/callCard"  
  28.                 android:layout_width="match_parent"  
  29.                 android:layout_height="wrap_content" />  
  30.         </RelativeLayout>  
  31.         <com.android.phone.InCallTouchUi  
  32.             android:id="@+id/inCallTouchUi"  
  33.             android:layout_width="match_parent"  
  34.             android:layout_height="wrap_content"/>  
  35.     </RelativeLayout>  
  36.     <ViewStub android:id="@+id/otaCallCardStub"  
  37.               android:layout="@layout/otacall_card"  
  38.               android:layout_width="match_parent"  
  39.               android:layout_height="match_parent"/>  
  40.     <ViewStub android:id="@+id/manageConferencePanelStub"  
  41.               android:layout="@layout/manage_conference_panel_new_ui"  
  42.               android:layout_width="match_parent"  
  43.               android:layout_height="match_parent"/>  
  44.     <LinearLayout android:id="@+id/inCallProviderOverlay"  
  45.         android:background="@drawable/dialog_bg_calling_via"  
  46.         android:layout_width="match_parent"  
  47.         android:layout_height="88dip"  
  48.         android:layout_marginTop="@dimen/provider_overlay_top_margin"  
  49.         android:layout_gravity="top"  
  50.         android:gravity="center"  
  51.         android:visibility="gone"  
  52.         android:orientation="horizontal">  
  53.          <ImageView android:id="@+id/callingViaIcon"  
  54.             android:layout_width="40dip"  
  55.             android:layout_height="40dip"/>  
  56.         <TextView android:id="@+id/callingVia"  
  57.             android:text="@string/calling_via_template"  
  58.             android:layout_weight="1"  
  59.             android:layout_width="0dip"  
  60.             android:layout_height="match_parent"  
  61.             android:textAppearance="?android:attr/textAppearanceSmallInverse"  
  62.             android:gravity="center"/>  
  63.         <View  
  64.             android:layout_width="40dip"  
  65.             android:layout_height="40dip"/>  
  66.     </LinearLayout>  
  67. </FrameLayout>  
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/incall_screen"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <com.android.phone.InCallContactPhoto android:id="@+id/photo"
        		   android:layout_alignParentTop="true"
                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:gravity="top|center_horizontal"
                   android:scaleType="centerCrop"
                   android:contentDescription="@string/contactPhoto"
                   android:background="@drawable/picture_unknown"/>
    <ImageView android:id="@+id/insetPhoto"
            android:layout_width="@dimen/contact_photo_inset_width"
            android:layout_height="@dimen/contact_photo_inset_height"
            android:scaleType="centerCrop"
            android:layout_marginLeft="@dimen/contact_photo_inset_left_margin"/>
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >
        <RelativeLayout
            android:id="@+id/inCallPanel"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignTop="@id/inCallTouchUi" >
            <com.android.phone.CallCard
                android:id="@+id/callCard"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </RelativeLayout>
        <com.android.phone.InCallTouchUi
            android:id="@+id/inCallTouchUi"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>
    </RelativeLayout>
    <ViewStub android:id="@+id/otaCallCardStub"
              android:layout="@layout/otacall_card"
              android:layout_width="match_parent"
              android:layout_height="match_parent"/>
    <ViewStub android:id="@+id/manageConferencePanelStub"
              android:layout="@layout/manage_conference_panel_new_ui"
              android:layout_width="match_parent"
              android:layout_height="match_parent"/>
    <LinearLayout android:id="@+id/inCallProviderOverlay"
        android:background="@drawable/dialog_bg_calling_via"
        android:layout_width="match_parent"
        android:layout_height="88dip"
        android:layout_marginTop="@dimen/provider_overlay_top_margin"
        android:layout_gravity="top"
        android:gravity="center"
        android:visibility="gone"
        android:orientation="horizontal">
         <ImageView android:id="@+id/callingViaIcon"
            android:layout_width="40dip"
            android:layout_height="40dip"/>
        <TextView android:id="@+id/callingVia"
            android:text="@string/calling_via_template"
            android:layout_weight="1"
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:textAppearance="?android:attr/textAppearanceSmallInverse"
            android:gravity="center"/>
        <View
            android:layout_width="40dip"
            android:layout_height="40dip"/>
    </LinearLayout>
</FrameLayout>

界面效果如图:

InCallContactPhoto

InCallContactPhoto用于显示头像图片,该类继承于ImageView类,显示效果如下:

CallCard

inCallPanel是一个相对布局,该布局位于InCallTouchUi之上,在该布局中放置了一个CallCard控件,CallCard继承与LinearLayout,其布局文件为call_card.xml

  1. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  
  2.     android:id="@+id/call_info_container"  
  3.     android:layout_width="match_parent"  
  4.     android:layout_height="wrap_content"  
  5.     android:background="@android:color/transparent"  
  6.     android:orientation="vertical">  
  7.     <RelativeLayout android:id="@+id/call_info_1"  
  8.         android:layout_width="match_parent"  
  9.         android:layout_height="0dp"  
  10.         android:layout_weight="1">  
  11.         <RelativeLayout android:id="@+id/call_banner_1"  
  12.             android:layout_alignParentBottom="true"  
  13.             android:layout_width="match_parent"  
  14.             android:layout_height="@dimen/call_banner_height_newui"  
  15.             android:paddingLeft="@dimen/call_banner_side_padding"  
  16.             android:paddingRight="@dimen/call_banner_side_padding"  
  17.             android:background="@drawable/call_storage_contact_blackbg_up_sprd">  
  18.             <FrameLayout   
  19.                     android:id="@+id/mainCallLayout"  
  20.                     android:layout_alignParentTop="true"  
  21.                     android:gravity="center"  
  22.                     android:layout_marginTop="3dip"  
  23.                     android:layout_width="match_parent"  
  24.                     android:layout_height="wrap_content">  
  25.               <TextView android:id="@+id/mainName"  
  26.                         android:layout_alignParentTop="true"  
  27.                         android:gravity="center"  
  28.                         android:layout_width="match_parent"  
  29.                         android:layout_height="wrap_content"  
  30.                         android:textColor="@color/incall_call_banner_text_color"  
  31.                         android:textStyle="bold"  
  32.                         android:textSize="15sp"  
  33.                         android:visibility="visible"  
  34.                         android:singleLine="true"/>  
  35.                 <!-- talk time -->  
  36.               <TextView android:id="@+id/elapsedTime"  
  37.                         android:layout_alignParentTop="true"  
  38.                         android:gravity="center"  
  39.                         android:layout_width="match_parent"  
  40.                         android:layout_height="wrap_content"  
  41.                         android:textStyle="bold"  
  42.                         android:textColor="@color/incall_call_banner_text_color"  
  43.                         android:textSize="15sp"  
  44.                         android:visibility="gone"  
  45.                         android:singleLine="true"/>  
  46.                 <!-- recording label -->  
  47.                 <TextView android:id="@+id/recordinglabel"  
  48.                         android:layout_width="match_parent"  
  49.                         android:layout_height="wrap_content"  
  50.                         android:layout_below="@id/elapsedTime"  
  51.                         android:gravity="left"  
  52.                         android:text="@string/recording"  
  53.                         style="@style/InCallCardTextNewUI"  
  54.                         android:textAllCaps="true"  
  55.                         android:visibility="gone"/>  
  56.             </FrameLayout>  
  57.             <!-- Contacts detail -->  
  58.             <LinearLayout android:id="@+id/labelAndNumber"  
  59.                           android:layout_below="@id/mainCallLayout"  
  60.                           android:layout_marginTop="2dip"  
  61.                           android:layout_width="match_parent"  
  62.                           android:layout_height="wrap_content"  
  63.                           android:gravity="center"  
  64.                           android:orientation="horizontal">  
  65.                 <!--Phone type: Phone-->  
  66.                 <TextView android:id="@+id/label"  
  67.                           android:layout_width="wrap_content"  
  68.                           android:layout_height="wrap_content"  
  69.                           style="@style/InCallCardTextNewUI"  
  70.                           android:layout_marginLeft="3dip"  
  71.                           android:layout_marginRight="6dip"  
  72.                           android:textAllCaps="true"  
  73.                           android:singleLine="true"  
  74.                           android:ellipsize="end"/>  
  75.                             <!-- Contacts name -->  
  76.                 <TextView android:id="@+id/name"  
  77.                           android:layout_width="wrap_content"  
  78.                           android:layout_height="wrap_content"  
  79.                           android:layout_gravity="center"  
  80.                           style="@style/InCallCardTextNewUI"  
  81.                           android:textAllCaps="true"  
  82.                           android:singleLine="true"  
  83.                           android:ellipsize="end"/>  
  84.                 <!--Phone number-->  
  85.                 <TextView android:id="@+id/phoneNumber"  
  86.                           android:layout_width="wrap_content"  
  87.                           android:layout_height="wrap_content"   
  88.                           style="@style/InCallCardTextNewUI"  
  89.                           android:singleLine="true"  
  90.                           android:ellipsize="end"  
  91.                           android:layout_marginLeft="10dip"/>  
  92.             </LinearLayout>  
  93.             <!-- Incoming,HOLd and so on -->  
  94.              <TextView android:id="@+id/callStateLabel"  
  95.                     android:layout_width="match_parent"  
  96.                     android:layout_marginTop="2dip"  
  97.                     android:layout_height="wrap_content"  
  98.                     android:layout_below="@id/labelAndNumber"  
  99.                     android:gravity="center"  
  100.                     android:ellipsize="end"  
  101.                     style="@style/InCallCardTextNewUI"  
  102.                     android:textAllCaps="true"  
  103.                     android:visibility="gone"/>  
  104.             <!--  Internet call -->  
  105.             <TextView android:id="@+id/callTypeLabel"  
  106.                       android:layout_marginTop="2dip"  
  107.                       android:layout_below="@id/callStateLabel"  
  108.                       android:layout_width="match_parent"  
  109.                       android:layout_height="wrap_content"  
  110.                       style="@style/InCallCardTextNewUI"  
  111.                       android:maxLines="1"  
  112.                       android:ellipsize="end"/>  
  113.             <!-- Social Status Now Not used -->  
  114.             <TextView android:id="@+id/socialStatus"  
  115.                       android:layout_marginTop="2dip"  
  116.                       android:layout_below="@id/callTypeLabel"  
  117.                       android:layout_width="match_parent"  
  118.                       android:layout_height="wrap_content"  
  119.                       style="@style/InCallCardTextNewUI"  
  120.                       android:textColor="@color/incall_call_banner_text_color"  
  121.                       android:maxLines="2"  
  122.                       android:ellipsize="end"/>  
  123.         </RelativeLayout>  
  124.     </RelativeLayout>  
  125.     <FrameLayout android:id="@+id/call_info_2"  
  126.         android:layout_width="match_parent"  
  127.         android:layout_height="40dip"  
  128.         android:background="@android:color/transparent"  
  129.         android:orientation="vertical">  
  130.         <LinearLayout android:id="@+id/call_banner_2"  
  131.             android:layout_width="match_parent"  
  132.             android:layout_height="match_parent"  
  133.             android:orientation="vertical"  
  134.             android:paddingLeft="@dimen/call_banner_side_padding"  
  135.             android:paddingRight="@dimen/call_banner_side_padding"  
  136.             android:background="@drawable/call_storage_contact_blackbg_info_sprd">  
  137.             <TextView android:id="@+id/secondaryCallName"  
  138.                       android:layout_width="match_parent"  
  139.                       android:layout_height="25dip"  
  140.                       android:layout_weight="1"  
  141.                       android:textAppearance="?android:attr/textAppearanceMedium"  
  142.                       android:textColor="@color/incall_call_banner_text_color"  
  143.                       android:singleLine="true"/>  
  144.             <TextView android:id="@+id/secondaryCallStatus"  
  145.                       android:layout_width="match_parent"  
  146.                       android:layout_height="20dip"  
  147.                       android:layout_weight="1"  
  148.                       android:text="@string/onHold"  
  149.                       style="@style/InCallCardTextNewUI"  
  150.                       android:textColor="@color/incall_call_banner_text_color"  
  151.                       android:textAllCaps="true"  
  152.                       android:singleLine="true"/>  
  153.         </LinearLayout>   
  154.     </FrameLayout>  
  155. </LinearLayout>  
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/call_info_container"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@android:color/transparent"
    android:orientation="vertical">
    <RelativeLayout android:id="@+id/call_info_1"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1">
        <RelativeLayout android:id="@+id/call_banner_1"
            android:layout_alignParentBottom="true"
            android:layout_width="match_parent"
            android:layout_height="@dimen/call_banner_height_newui"
            android:paddingLeft="@dimen/call_banner_side_padding"
            android:paddingRight="@dimen/call_banner_side_padding"
            android:background="@drawable/call_storage_contact_blackbg_up_sprd">
			<FrameLayout 
	                android:id="@+id/mainCallLayout"
	                android:layout_alignParentTop="true"
	                android:gravity="center"
	                android:layout_marginTop="3dip"
	                android:layout_width="match_parent"
	                android:layout_height="wrap_content">
	          <TextView android:id="@+id/mainName"
		                android:layout_alignParentTop="true"
		                android:gravity="center"
		                android:layout_width="match_parent"
		                android:layout_height="wrap_content"
		                android:textColor="@color/incall_call_banner_text_color"
		                android:textStyle="bold"
		                android:textSize="15sp"
		                android:visibility="visible"
		                android:singleLine="true"/>
	            <!-- talk time -->
		      <TextView android:id="@+id/elapsedTime"
		                android:layout_alignParentTop="true"
		                android:gravity="center"
		                android:layout_width="match_parent"
		                android:layout_height="wrap_content"
		                android:textStyle="bold"
		                android:textColor="@color/incall_call_banner_text_color"
		                android:textSize="15sp"
		                android:visibility="gone"
			            android:singleLine="true"/>
	            <!-- recording label -->
	            <TextView android:id="@+id/recordinglabel"
			            android:layout_width="match_parent"
			            android:layout_height="wrap_content"
			            android:layout_below="@id/elapsedTime"
			            android:gravity="left"
			            android:text="@string/recording"
			            style="@style/InCallCardTextNewUI"
			            android:textAllCaps="true"
			            android:visibility="gone"/>
            </FrameLayout>
            <!-- Contacts detail -->
            <LinearLayout android:id="@+id/labelAndNumber"
                          android:layout_below="@id/mainCallLayout"
                          android:layout_marginTop="2dip"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          android:gravity="center"
                          android:orientation="horizontal">
                <!--Phone type: Phone-->
                <TextView android:id="@+id/label"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          style="@style/InCallCardTextNewUI"
                          android:layout_marginLeft="3dip"
                          android:layout_marginRight="6dip"
                          android:textAllCaps="true"
                          android:singleLine="true"
                          android:ellipsize="end"/>
                            <!-- Contacts name -->
	            <TextView android:id="@+id/name"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_gravity="center"
                          style="@style/InCallCardTextNewUI"
                          android:textAllCaps="true"
                          android:singleLine="true"
                          android:ellipsize="end"/>
                <!--Phone number-->
                <TextView android:id="@+id/phoneNumber"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content" 
                          style="@style/InCallCardTextNewUI"
                          android:singleLine="true"
                          android:ellipsize="end"
                          android:layout_marginLeft="10dip"/>
            </LinearLayout>
			<!-- Incoming,HOLd and so on -->
             <TextView android:id="@+id/callStateLabel"
		            android:layout_width="match_parent"
		            android:layout_marginTop="2dip"
		            android:layout_height="wrap_content"
		            android:layout_below="@id/labelAndNumber"
		            android:gravity="center"
		            android:ellipsize="end"
		            style="@style/InCallCardTextNewUI"
		            android:textAllCaps="true"
		            android:visibility="gone"/>
            <!--  Internet call -->
            <TextView android:id="@+id/callTypeLabel"
                	  android:layout_marginTop="2dip"
                      android:layout_below="@id/callStateLabel"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      style="@style/InCallCardTextNewUI"
                      android:maxLines="1"
                      android:ellipsize="end"/>
            <!-- Social Status Now Not used -->
            <TextView android:id="@+id/socialStatus"
                      android:layout_marginTop="2dip"
                      android:layout_below="@id/callTypeLabel"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      style="@style/InCallCardTextNewUI"
                      android:textColor="@color/incall_call_banner_text_color"
                      android:maxLines="2"
                      android:ellipsize="end"/>
        </RelativeLayout>
    </RelativeLayout>
    <FrameLayout android:id="@+id/call_info_2"
        android:layout_width="match_parent"
        android:layout_height="40dip"
        android:background="@android:color/transparent"
        android:orientation="vertical">
        <LinearLayout android:id="@+id/call_banner_2"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:paddingLeft="@dimen/call_banner_side_padding"
            android:paddingRight="@dimen/call_banner_side_padding"
            android:background="@drawable/call_storage_contact_blackbg_info_sprd">
            <TextView android:id="@+id/secondaryCallName"
                      android:layout_width="match_parent"
                      android:layout_height="25dip"
                      android:layout_weight="1"
                      android:textAppearance="?android:attr/textAppearanceMedium"
                      android:textColor="@color/incall_call_banner_text_color"
                      android:singleLine="true"/>
            <TextView android:id="@+id/secondaryCallStatus"
                      android:layout_width="match_parent"
                      android:layout_height="20dip"
                      android:layout_weight="1"
                      android:text="@string/onHold"
                      style="@style/InCallCardTextNewUI"
                      android:textColor="@color/incall_call_banner_text_color"
                      android:textAllCaps="true"
                      android:singleLine="true"/>
        </LinearLayout> 
    </FrameLayout>
</LinearLayout>

InCallTouchUi

InCallTouchUi控件是拨号操作界面,InCallTouchUi继承于FrameLayout布局,其对应的布局文件为incall_touch_ui.xml

  1. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"  
  2.     xmlns:prvandroid="http://schemas.android.com/apk/prv/res/android"  
  3.     android:layout_width="match_parent"  
  4.     android:layout_height="match_parent" >  
  5.     <RelativeLayout  
  6.         android:id="@+id/CallEndControls"  
  7.         android:layout_width="match_parent"  
  8.         android:layout_height="wrap_content"  
  9.         android:layout_alignParentBottom="true"  
  10.         android:visibility="gone" >  
  11.         <LinearLayout  
  12.             android:id="@+id/actionBar_normal"  
  13.             android:layout_width="match_parent"  
  14.             android:layout_height="wrap_content"  
  15.             android:layout_alignParentBottom="true"  
  16.             android:background="@drawable/call_storage_contact_blackbg_down_sprd"  
  17.             android:orientation="vertical" >  
  18.             <Button  
  19.                 android:id="@+id/ContactsNew"  
  20.                 android:layout_alignParentLeft="true"  
  21.                 android:layout_height="60dip"  
  22.                 android:layout_width="140dip"  
  23.                 android:text="@string/menu_add"  
  24.                 android:background="@drawable/call_button_reject" />  
  25.             <!-- Accept Call -->  
  26.             <Button  
  27.                 android:id="@+id/ContactsAdd"  
  28.                 android:layout_alignParentRight="true"  
  29.                 android:layout_height="60dip"  
  30.                 android:layout_width="140dip"  
  31.                 android:text="@string/menu_edit"  
  32.                 android:background="@drawable/call_button_answer" />  
  33.         </LinearLayout>  
  34.     </RelativeLayout>  
  35.   
  36.     <RelativeLayout  
  37.         android:id="@+id/inComingCallControlsLocked"  
  38.         android:layout_width="match_parent"  
  39.         android:layout_height="wrap_content"  
  40.         android:layout_alignParentBottom="true"  
  41.         android:background="@android:color/transparent"  
  42.         android:visibility="gone" >  
  43.     <com.android.phone.VerticalScrollLayout  
  44.                     android:id="@+id/ScrollLayout"  
  45.                     android:layout_width="match_parent"  
  46.                     android:background="@android:color/transparent"  
  47.                     android:layout_height="200dip"/>  
  48.     </RelativeLayout>  
  49.   
  50.     <RelativeLayout  
  51.         android:id="@+id/inComingCallControls"  
  52.         android:layout_width="match_parent"  
  53.         android:layout_height="wrap_content"  
  54.         android:layout_alignParentBottom="true"  
  55.         android:visibility="gone" >  
  56.         <LinearLayout  
  57.             android:id="@+id/actionBar_normal"  
  58.             android:layout_width="match_parent"  
  59.             android:layout_height="wrap_content"  
  60.             android:layout_alignParentBottom="true"  
  61.             android:background="@drawable/call_storage_contact_blackbg_down_sprd"  
  62.             android:orientation="vertical" >  
  63.             <LinearLayout  
  64.                 android:id="@+id/actionBar_normal_f"  
  65.                 android:layout_width="match_parent"  
  66.                 android:layout_height="wrap_content"  
  67.                 android:orientation="horizontal"  
  68.                 android:paddingLeft="@dimen/button_cluster_side_padding"  
  69.                 android:paddingRight="@dimen/button_cluster_side_padding" >  
  70.                 <LinearLayout  
  71.                     android:id="@+id/handfree"  
  72.                     android:layout_width="wrap_content"  
  73.                     android:layout_height="wrap_content"  
  74.                     android:layout_weight="1"  
  75.                     android:orientation="vertical" >  
  76.                     <ToggleButton  
  77.                         android:id="@+id/handfreeButtonImage"  
  78.                         style="@style/ImageButtonNewUi_incoming"  
  79.                         android:textOn="@null"  
  80.                         android:textOff="@null"  
  81.                         android:layout_gravity="center"  
  82.                         android:background="@drawable/btn_compound_handfree_background" />  
  83.                     <TextView  
  84.                         android:id="@+id/handfreeButtonLabel"  
  85.                         style="@style/InCallExtraRowButtonLabelNewUI"  
  86.                         android:layout_gravity="center"  
  87.                         android:layout_marginTop="-15dip"  
  88.                         android:text="@string/onscreenSpeakerText" />  
  89.                 </LinearLayout>  
  90.                 <LinearLayout  
  91.                     android:id="@+id/MessageButton"  
  92.                     android:layout_width="wrap_content"  
  93.                     android:layout_height="wrap_content"  
  94.                     android:layout_weight="1"  
  95.                     android:orientation="vertical" >  
  96.                     <ImageButton  
  97.                         android:id="@+id/MessageButtonImage"  
  98.                         style="@style/ImageButtonNewUi_incoming"  
  99.                         android:layout_gravity="center"  
  100.                         android:background="#00000000"  
  101.                         android:src="@drawable/call_button_feedback" />  
  102.                     <TextView  
  103.                         android:id="@+id/MessageButtonLabel"  
  104.                         style="@style/InCallExtraRowButtonLabelNewUI"  
  105.                         android:layout_gravity="center"  
  106.                         android:layout_marginTop="-15dip"  
  107.                         android:text="@string/description_target_send_sms" />  
  108.                 </LinearLayout>  
  109.                 <LinearLayout  
  110.                     android:id="@+id/IncomingMuteLayout"  
  111.                     android:layout_width="wrap_content"  
  112.                     android:layout_height="wrap_content"  
  113.                     android:layout_weight="1"  
  114.                     android:orientation="vertical" >  
  115.                     <ImageButton  
  116.                         android:id="@+id/MuteButtonImage"  
  117.                         style="@style/ImageButtonNewUi_incoming"  
  118.                         android:layout_gravity="center"  
  119.                         android:background="#00000000"  
  120.                         android:src="@drawable/call_button_mute_newui" />  
  121.                     <TextView  
  122.                         android:id="@+id/MuteRingButtonLabel"  
  123.                         android:layout_width="wrap_content"  
  124.                         android:layout_height="wrap_content"  
  125.                         android:textAppearance="?android:attr/textAppearanceSmall"  
  126.                         android:textAllCaps="true"  
  127.                         android:textColor="@color/mute_button_text"  
  128.                         android:layout_marginLeft="5dip"  
  129.                         android:layout_marginRight="5dip"  
  130.                         android:layout_gravity="center"  
  131.                         android:layout_marginTop="-15dip"  
  132.                         android:text="@string/onscreenMusicMuteText" />  
  133.                 </LinearLayout>  
  134.             </LinearLayout>  
  135.             <LinearLayout  
  136.                 android:layout_width="match_parent"  
  137.                 android:layout_height="wrap_content"  
  138.                 android:orientation="horizontal"  
  139.                 android:layout_marginTop="@dimen/button_margin"  
  140.                 android:layout_marginBottom="@dimen/button_margin"  
  141.                 android:paddingLeft="@dimen/button_cluster_side_padding"  
  142.                 android:paddingRight="@dimen/button_cluster_side_padding" >  
  143.                 <Button  
  144.                     android:id="@+id/IncomingCallRejectButton"  
  145.                     android:layout_height="50dip"  
  146.                     android:layout_weight="1"  
  147.                     android:layout_width="match_parent"  
  148.                     android:layout_marginRight="@dimen/button_cluster_side_padding"  
  149.                     android:text="@string/description_target_decline"  
  150.                     android:textSize="20dip"  
  151.                     android:background="@drawable/call_button_reject" />  
  152.                 <Button  
  153.                     android:id="@+id/IncomingCallAnswerButton"  
  154.                     android:layout_height="50dip"  
  155.                     android:layout_weight="1"  
  156.                     android:layout_width="match_parent"  
  157.                     android:layout_marginLeft="@dimen/button_cluster_side_padding"  
  158.                     android:text="@string/description_target_answer"  
  159.                     android:textSize="20dip"  
  160.                     android:background="@drawable/call_button_answer" />  
  161.             </LinearLayout>  
  162.         </LinearLayout>  
  163.     </RelativeLayout>  
  164.     <RelativeLayout  
  165.         android:id="@+id/inCallControls"  
  166.         android:layout_width="match_parent"  
  167.         android:layout_height="wrap_content"  
  168.         android:layout_alignParentTop="true"  
  169.         android:visibility="gone" >  
  170.         <LinearLayout  
  171.                 android:id="@+id/manageConferenceButton"  
  172.                 android:layout_width="match_parent"  
  173.                 android:layout_height="wrap_content"  
  174.                 android:layout_alignParentTop="true"  
  175.                 android:layout_centerHorizontal="true"  
  176.                 android:background="@android:color/transparent"  
  177.                 android:gravity="center"  
  178.                 android:orientation="horizontal" >  
  179.                 <ImageButton  
  180.                     android:id="@+id/manageConferenceButtonImage"  
  181.                     android:layout_height="wrap_content"  
  182.                     android:layout_width="wrap_content"  
  183.                     android:layout_gravity="center"  
  184.                     android:background="@android:color/transparent"  
  185.                     android:contentDescription="@string/onscreenManageConferenceText"  
  186.                     android:src="@drawable/btn_compound_conference_newui" />  
  187.                 <TextView  
  188.                     android:id="@+id/manageConferenceButtonLabel"  
  189.                     style="@style/InCallExtraRowButtonLabelNewUI"  
  190.                     android:layout_marginTop="10dip"  
  191.                     android:layout_gravity="center"  
  192.                     android:visibility="gone"  
  193.                     android:text="@string/onscreenManageConferenceText" />  
  194.             </LinearLayout>  
  195.         <LinearLayout  
  196.             android:id="@+id/bottomButtons"  
  197.             android:layout_width="match_parent"  
  198.             android:layout_height="wrap_content"  
  199.             android:layout_alignParentBottom="true"  
  200.             android:background="@drawable/call_storage_contact_blackbg_down_sprd"  
  201.             android:orientation="vertical" >  
  202.         <FrameLayout  
  203.                 android:layout_width="match_parent"  
  204.                 android:layout_height="wrap_content">  
  205.             <FrameLayout  
  206.                 android:id="@+id/extraButtonRow"  
  207.                 android:layout_width="match_parent"  
  208.                 android:layout_height="wrap_content"  
  209.                 android:visibility="gone"  
  210.                 android:paddingLeft="@dimen/button_cluster_side_padding"  
  211.                 android:paddingRight="@dimen/button_cluster_side_padding" >  
  212.                 <LinearLayout  
  213.                     android:id="@+id/cdmaMergeButton"  
  214.                     android:layout_width="match_parent"  
  215.                     android:layout_height="wrap_content"  
  216.                     android:background="?android:attr/selectableItemBackground"  
  217.                     android:orientation="horizontal" >  
  218.                     <ImageButton  
  219.                         android:id="@+id/cdmaMergeButtonImage"  
  220.                         style="@style/InCallButton"  
  221.                         android:clickable="false"  
  222.                         android:contentDescription="@string/onscreenMergeCallsText"  
  223.                         android:src="@drawable/ic_merge_holo_dark" />  
  224.                     <TextView  
  225.                         android:id="@+id/cdmaMergeButtonLabel"  
  226.                         style="@style/InCallExtraRowButtonLabelNewUI"  
  227.                         android:text="@string/onscreenMergeCallsText" />  
  228.                 </LinearLayout>  
  229.             </FrameLayout>  
  230.             <LinearLayout  
  231.                 android:id="@+id/bottomButtonsRow2"  
  232.                 android:layout_width="match_parent"  
  233.                 android:layout_height="80dip"  
  234.                 android:visibility="visible"  
  235.                 android:gravity="center_vertical"  
  236.                 android:orientation="horizontal">  
  237.                 <LinearLayout  
  238.                     android:layout_width="match_parent"  
  239.                     android:layout_height="80dip"  
  240.                     android:gravity="center_horizontal"  
  241.                     android:layout_weight="1"  
  242.                     android:orientation="vertical" >  
  243.                     <ToggleButton  
  244.                         android:id="@+id/menuPhoneRecorder"  
  245.                         style="@style/InCallButtonNewUi"  
  246.                         android:layout_gravity="center"  
  247.                         android:layout_marginRight="6dip"  
  248.                         android:background="@drawable/btn_compound_record_newui"  
  249.                         android:contentDescription="@string/onscreenShowRecodText" />  
  250.                     <TextView  
  251.                         android:id="@+id/menuPhoneRecorderLabel"  
  252.                         style="@style/InCallExtraRowButtonLabelNewUI"  
  253.                         android:layout_marginRight="6dip"  
  254.                         android:layout_gravity="center"  
  255.                         android:singleLine="true"  
  256.                         android:layout_marginTop="-15dip"  
  257.                         android:text="@string/audio_db_album_name" />  
  258.                 </LinearLayout>  
  259.                 <LinearLayout  
  260.                     android:layout_width="match_parent"  
  261.                     android:layout_height="80dip"  
  262.                     android:layout_gravity="center"  
  263.                     android:gravity="center_horizontal"  
  264.                     android:layout_weight="1"  
  265.                     android:orientation="vertical" >  
  266.                     <ToggleButton  
  267.                         android:id="@+id/holdButton"  
  268.                         android:gravity="center"  
  269.                         style="@style/ImageButtonNewUi_new"  
  270.                         android:textOn="@null"  
  271.                         android:textOff="@null"  
  272.                         android:layout_marginTop="24dip"  
  273.                         android:background="@drawable/btn_compound_hold_newui"  
  274.                         android:contentDescription="@string/onscreenHoldText" />  
  275.                     <ImageButton  
  276.                         android:id="@+id/swapButton"  
  277.                         style="@style/ImageButtonNewUi_new"  
  278.                         android:scaleType="center"  
  279.                         android:background="#00000000"  
  280.                         android:layout_marginTop="24dip"  
  281.                         android:contentDescription="@string/onscreenSwapCallsText"  
  282.                         android:src="@drawable/btn_compound_switch_newui" />  
  283.                     <TextView  
  284.                         android:id="@+id/holdButtonLabel"  
  285.                         style="@style/InCallExtraRowButtonLabelNewUI"  
  286.                         android:layout_gravity="center"  
  287.                         android:singleLine="true"  
  288.                         android:layout_marginTop="6dip"  
  289.                         android:text="@string/card_title_on_hold" />  
  290.                 </LinearLayout>  
  291.                 <LinearLayout  
  292.                     android:layout_width="match_parent"  
  293.                     android:layout_height="80dip"  
  294.                     android:gravity="center_horizontal"  
  295.                     android:layout_weight="1"  
  296.                     android:layout_marginTop="24dip"  
  297.                     android:orientation="vertical" >  
  298.                     <ImageButton  
  299.                         android:id="@+id/addButton"  
  300.                         style="@style/ImageButtonNewUi_new"  
  301.                         android:layout_marginLeft="6dip"  
  302.                         android:scaleType="center"  
  303.                         android:background="#00000000"  
  304.                         android:contentDescription="@string/onscreenAddCallText"  
  305.                         android:src="@drawable/btn_compound_merge_background_newui" />  
  306.                     <ImageButton  
  307.                         android:id="@+id/mergeButton"  
  308.                         style="@style/ImageButtonNewUi_new"  
  309.                         android:layout_marginLeft="6dip"  
  310.                         android:scaleType="center"  
  311.                         android:background="#00000000"  
  312.                         android:contentDescription="@string/onscreenMergeCallsText"  
  313.                         android:src="@drawable/btn_compound_merge_button_newui" />  
  314.                     <TextView  
  315.                         android:id="@+id/addButtonLabel"  
  316.                         style="@style/InCallExtraRowButtonLabelNewUI"  
  317.                         android:layout_marginTop="6dip"  
  318.                         android:layout_marginLeft="2dip"  
  319.                         android:singleLine="true"  
  320.                         android:layout_gravity="center"  
  321.                         android:text="@string/selectContact" />  
  322.                 </LinearLayout>  
  323.             </LinearLayout>  
  324.             <ViewStub  
  325.                 android:id="@+id/dtmf_twelve_key_dialer_stub"  
  326.                 android:layout_width="match_parent"  
  327.                 android:layout_height="match_parent"  
  328.                 android:background="@android:color/transparent"  
  329.                 android:layout="@layout/dtmf_twelve_key_dialer_view_newui" />  
  330.             </FrameLayout>  
  331.             <LinearLayout  
  332.                 android:layout_width="match_parent"  
  333.                 android:layout_height="80dip"  
  334.                 android:orientation="horizontal"   
  335.                 android:visibility="visible"  
  336.                 android:gravity="center_vertical">  
  337.                 <LinearLayout  
  338.                     android:layout_width="match_parent"  
  339.                     android:layout_height="80dip"  
  340.                     android:gravity="center_horizontal"  
  341.                     android:layout_weight="1"  
  342.                     android:orientation="vertical" >  
  343.                     <ToggleButton  
  344.                         android:id="@+id/audioButton"  
  345.                         android:gravity="center"  
  346.                         style="@style/InCallButtonNewUi"  
  347.                         android:layout_marginRight="6dip"  
  348.                         android:background="@drawable/btn_compound_audio_newui"  
  349.                         android:contentDescription="@string/onscreenAudioText" />  
  350.                     <TextView  
  351.                         android:id="@+id/audioButtonLabel"  
  352.                         style="@style/InCallExtraRowButtonLabelNewUI"  
  353.                         android:layout_gravity="center"  
  354.                         android:layout_marginRight="6dip"  
  355.                         android:singleLine="true"  
  356.                         android:layout_marginTop="-15dip"  
  357.                         android:text="@string/onscreenSpeakerText" />  
  358.                 </LinearLayout>  
  359.                 <LinearLayout  
  360.                     android:layout_width="match_parent"  
  361.                     android:layout_height="80dip"  
  362.                     android:layout_weight="1"  
  363.                     android:gravity="center_horizontal"  
  364.                     android:layout_gravity="center"  
  365.                     android:orientation="vertical" >  
  366.                     <ToggleButton  
  367.                         android:id="@+id/dialpadButton"  
  368.                         android:gravity="center"  
  369.                         style="@style/InCallButtonNewUi"  
  370.                         android:background="@drawable/btn_compound_keyboard_newui"  
  371.                         android:contentDescription="@string/video_btn_dialer" />  
  372.                     <TextView  
  373.                         android:id="@+id/dialpadButtonLabel"  
  374.                         style="@style/InCallExtraRowButtonLabelNewUI"  
  375.                         android:layout_gravity="center"  
  376.                         android:layout_marginTop="-15dip"  
  377.                         android:singleLine="true"  
  378.                         android:text="@string/video_btn_dialer" />  
  379.                 </LinearLayout>  
  380.                 <LinearLayout  
  381.                     android:layout_width="match_parent"  
  382.                     android:layout_height="80dip"  
  383.                     android:layout_weight="1"  
  384.                     android:layout_gravity="center_horizontal"  
  385.                     android:orientation="vertical" >  
  386.                     <ToggleButton  
  387.                         android:id="@+id/muteButton"  
  388.                         style="@style/InCallButtonNewUi"  
  389.                         android:layout_gravity="center"  
  390.                         android:layout_marginLeft="6dip"  
  391.                         android:background="@drawable/btn_compound_mute_newui"  
  392.                         android:contentDescription="@string/onscreenMuteText" />  
  393.                     <TextView  
  394.                         android:id="@+id/muteButtonLabel"  
  395.                         style="@style/InCallExtraRowButtonLabelNewUI"  
  396.                         android:singleLine="true"  
  397.                         android:layout_gravity="center"  
  398.                         android:layout_marginLeft="4dip"  
  399.                         android:layout_marginTop="-15dip"  
  400.                         android:text="@string/video_mute" />  
  401.                 </LinearLayout>  
  402.             </LinearLayout>  
  403.             <LinearLayout  
  404.                 android:layout_width="match_parent"  
  405.                 android:layout_height="84dip"  
  406.                 android:paddingLeft="@dimen/button_cluster_side_padding_newui"  
  407.                 android:paddingRight="@dimen/button_cluster_side_padding_newui"  
  408.                 android:orientation="horizontal" >  
  409.                 <Button  
  410.                     android:id="@+id/endButton"  
  411.                     style="@style/InCallEndButtonNewUI"  
  412.                     android:layout_marginTop="20dip"  
  413.                     android:layout_marginBottom="@dimen/button_cluster_side_padding_newui"  
  414.                     android:layout_width="match_parent"  
  415.                     android:text="@string/onscreenEndCallText"  
  416.                     android:textColor="@color/incall_call_banner_text_color"  
  417.                     android:contentDescription="@string/onscreenEndCallText"  
  418.                     android:background="@drawable/call_button_reject" />  
  419.             </LinearLayout>  
  420.         </LinearLayout>  
  421.     </RelativeLayout>  
  422. </RelativeLayout>  
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:prvandroid="http://schemas.android.com/apk/prv/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
    <RelativeLayout
        android:id="@+id/CallEndControls"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:visibility="gone" >
        <LinearLayout
            android:id="@+id/actionBar_normal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:background="@drawable/call_storage_contact_blackbg_down_sprd"
            android:orientation="vertical" >
            <Button
                android:id="@+id/ContactsNew"
                android:layout_alignParentLeft="true"
                android:layout_height="60dip"
                android:layout_width="140dip"
                android:text="@string/menu_add"
                android:background="@drawable/call_button_reject" />
            <!-- Accept Call -->
            <Button
                android:id="@+id/ContactsAdd"
                android:layout_alignParentRight="true"
                android:layout_height="60dip"
                android:layout_width="140dip"
                android:text="@string/menu_edit"
                android:background="@drawable/call_button_answer" />
        </LinearLayout>
    </RelativeLayout>

    <RelativeLayout
        android:id="@+id/inComingCallControlsLocked"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="@android:color/transparent"
        android:visibility="gone" >
    <com.android.phone.VerticalScrollLayout
	                android:id="@+id/ScrollLayout"
	                android:layout_width="match_parent"
	                android:background="@android:color/transparent"
	                android:layout_height="200dip"/>
    </RelativeLayout>

    <RelativeLayout
        android:id="@+id/inComingCallControls"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:visibility="gone" >
        <LinearLayout
            android:id="@+id/actionBar_normal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:background="@drawable/call_storage_contact_blackbg_down_sprd"
            android:orientation="vertical" >
            <LinearLayout
                android:id="@+id/actionBar_normal_f"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:paddingLeft="@dimen/button_cluster_side_padding"
                android:paddingRight="@dimen/button_cluster_side_padding" >
                <LinearLayout
                    android:id="@+id/handfree"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="vertical" >
                    <ToggleButton
                        android:id="@+id/handfreeButtonImage"
                        style="@style/ImageButtonNewUi_incoming"
                        android:textOn="@null"
                        android:textOff="@null"
                        android:layout_gravity="center"
                        android:background="@drawable/btn_compound_handfree_background" />
                    <TextView
                        android:id="@+id/handfreeButtonLabel"
                        style="@style/InCallExtraRowButtonLabelNewUI"
                        android:layout_gravity="center"
                        android:layout_marginTop="-15dip"
                        android:text="@string/onscreenSpeakerText" />
                </LinearLayout>
                <LinearLayout
                    android:id="@+id/MessageButton"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="vertical" >
                    <ImageButton
                        android:id="@+id/MessageButtonImage"
                        style="@style/ImageButtonNewUi_incoming"
                        android:layout_gravity="center"
                        android:background="#00000000"
                        android:src="@drawable/call_button_feedback" />
                    <TextView
                        android:id="@+id/MessageButtonLabel"
                        style="@style/InCallExtraRowButtonLabelNewUI"
                        android:layout_gravity="center"
                        android:layout_marginTop="-15dip"
                        android:text="@string/description_target_send_sms" />
                </LinearLayout>
                <LinearLayout
                    android:id="@+id/IncomingMuteLayout"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="vertical" >
                    <ImageButton
                        android:id="@+id/MuteButtonImage"
                        style="@style/ImageButtonNewUi_incoming"
                        android:layout_gravity="center"
                        android:background="#00000000"
                        android:src="@drawable/call_button_mute_newui" />
                    <TextView
                        android:id="@+id/MuteRingButtonLabel"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        android:textAllCaps="true"
                        android:textColor="@color/mute_button_text"
                        android:layout_marginLeft="5dip"
                        android:layout_marginRight="5dip"
                        android:layout_gravity="center"
                        android:layout_marginTop="-15dip"
                        android:text="@string/onscreenMusicMuteText" />
                </LinearLayout>
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_marginTop="@dimen/button_margin"
                android:layout_marginBottom="@dimen/button_margin"
                android:paddingLeft="@dimen/button_cluster_side_padding"
                android:paddingRight="@dimen/button_cluster_side_padding" >
                <Button
                    android:id="@+id/IncomingCallRejectButton"
                    android:layout_height="50dip"
                    android:layout_weight="1"
                    android:layout_width="match_parent"
                    android:layout_marginRight="@dimen/button_cluster_side_padding"
                    android:text="@string/description_target_decline"
                    android:textSize="20dip"
                    android:background="@drawable/call_button_reject" />
                <Button
                    android:id="@+id/IncomingCallAnswerButton"
                    android:layout_height="50dip"
                    android:layout_weight="1"
                    android:layout_width="match_parent"
                    android:layout_marginLeft="@dimen/button_cluster_side_padding"
                    android:text="@string/description_target_answer"
                    android:textSize="20dip"
                    android:background="@drawable/call_button_answer" />
            </LinearLayout>
        </LinearLayout>
    </RelativeLayout>
    <RelativeLayout
        android:id="@+id/inCallControls"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:visibility="gone" >
        <LinearLayout
                android:id="@+id/manageConferenceButton"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:layout_centerHorizontal="true"
                android:background="@android:color/transparent"
                android:gravity="center"
                android:orientation="horizontal" >
                <ImageButton
                    android:id="@+id/manageConferenceButtonImage"
                    android:layout_height="wrap_content"
                    android:layout_width="wrap_content"
                    android:layout_gravity="center"
                    android:background="@android:color/transparent"
                    android:contentDescription="@string/onscreenManageConferenceText"
                    android:src="@drawable/btn_compound_conference_newui" />
                <TextView
                    android:id="@+id/manageConferenceButtonLabel"
                    style="@style/InCallExtraRowButtonLabelNewUI"
                    android:layout_marginTop="10dip"
                    android:layout_gravity="center"
                    android:visibility="gone"
                    android:text="@string/onscreenManageConferenceText" />
            </LinearLayout>
        <LinearLayout
            android:id="@+id/bottomButtons"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:background="@drawable/call_storage_contact_blackbg_down_sprd"
            android:orientation="vertical" >
        <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
            <FrameLayout
                android:id="@+id/extraButtonRow"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:visibility="gone"
                android:paddingLeft="@dimen/button_cluster_side_padding"
                android:paddingRight="@dimen/button_cluster_side_padding" >
                <LinearLayout
                    android:id="@+id/cdmaMergeButton"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="?android:attr/selectableItemBackground"
                    android:orientation="horizontal" >
                    <ImageButton
                        android:id="@+id/cdmaMergeButtonImage"
                        style="@style/InCallButton"
                        android:clickable="false"
                        android:contentDescription="@string/onscreenMergeCallsText"
                        android:src="@drawable/ic_merge_holo_dark" />
                    <TextView
                        android:id="@+id/cdmaMergeButtonLabel"
                        style="@style/InCallExtraRowButtonLabelNewUI"
                        android:text="@string/onscreenMergeCallsText" />
                </LinearLayout>
            </FrameLayout>
			<LinearLayout
                android:id="@+id/bottomButtonsRow2"
                android:layout_width="match_parent"
                android:layout_height="80dip"
                android:visibility="visible"
                android:gravity="center_vertical"
                android:orientation="horizontal">
                <LinearLayout
	                android:layout_width="match_parent"
	                android:layout_height="80dip"
	                android:gravity="center_horizontal"
	                android:layout_weight="1"
	                android:orientation="vertical" >
	                <ToggleButton
	                    android:id="@+id/menuPhoneRecorder"
	                    style="@style/InCallButtonNewUi"
	                    android:layout_gravity="center"
	                    android:layout_marginRight="6dip"
	                    android:background="@drawable/btn_compound_record_newui"
	                    android:contentDescription="@string/onscreenShowRecodText" />
	                <TextView
                        android:id="@+id/menuPhoneRecorderLabel"
                        style="@style/InCallExtraRowButtonLabelNewUI"
                        android:layout_marginRight="6dip"
                        android:layout_gravity="center"
                        android:singleLine="true"
                        android:layout_marginTop="-15dip"
                        android:text="@string/audio_db_album_name" />
	            </LinearLayout>
                <LinearLayout
	                android:layout_width="match_parent"
	                android:layout_height="80dip"
	                android:layout_gravity="center"
					android:gravity="center_horizontal"
	                android:layout_weight="1"
	                android:orientation="vertical" >
	                <ToggleButton
	                    android:id="@+id/holdButton"
	                    android:gravity="center"
	                    style="@style/ImageButtonNewUi_new"
	                    android:textOn="@null"
	                    android:textOff="@null"
	                    android:layout_marginTop="24dip"
	                    android:background="@drawable/btn_compound_hold_newui"
	                    android:contentDescription="@string/onscreenHoldText" />
	                <ImageButton
	                    android:id="@+id/swapButton"
	                    style="@style/ImageButtonNewUi_new"
	                    android:scaleType="center"
	                    android:background="#00000000"
	                    android:layout_marginTop="24dip"
	                    android:contentDescription="@string/onscreenSwapCallsText"
	                    android:src="@drawable/btn_compound_switch_newui" />
	                <TextView
                        android:id="@+id/holdButtonLabel"
                        style="@style/InCallExtraRowButtonLabelNewUI"
                        android:layout_gravity="center"
                        android:singleLine="true"
                        android:layout_marginTop="6dip"
                        android:text="@string/card_title_on_hold" />
				</LinearLayout>
                <LinearLayout
	                android:layout_width="match_parent"
	                android:layout_height="80dip"
	                android:gravity="center_horizontal"
	                android:layout_weight="1"
	                android:layout_marginTop="24dip"
	                android:orientation="vertical" >
	                <ImageButton
	                    android:id="@+id/addButton"
	                    style="@style/ImageButtonNewUi_new"
	                    android:layout_marginLeft="6dip"
	                    android:scaleType="center"
	                    android:background="#00000000"
	                    android:contentDescription="@string/onscreenAddCallText"
	                	android:src="@drawable/btn_compound_merge_background_newui" />
	                <ImageButton
	                    android:id="@+id/mergeButton"
	                    style="@style/ImageButtonNewUi_new"
	                    android:layout_marginLeft="6dip"
	                    android:scaleType="center"
	                    android:background="#00000000"
	                    android:contentDescription="@string/onscreenMergeCallsText"
	               		android:src="@drawable/btn_compound_merge_button_newui" />
	                <TextView
                        android:id="@+id/addButtonLabel"
                        style="@style/InCallExtraRowButtonLabelNewUI"
                        android:layout_marginTop="6dip"
                        android:layout_marginLeft="2dip"
                        android:singleLine="true"
                        android:layout_gravity="center"
                        android:text="@string/selectContact" />
				</LinearLayout>
            </LinearLayout>
	        <ViewStub
	            android:id="@+id/dtmf_twelve_key_dialer_stub"
	            android:layout_width="match_parent"
	            android:layout_height="match_parent"
	            android:background="@android:color/transparent"
	            android:layout="@layout/dtmf_twelve_key_dialer_view_newui" />
	        </FrameLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="80dip"
                android:orientation="horizontal" 
                android:visibility="visible"
                android:gravity="center_vertical">
				<LinearLayout
	                android:layout_width="match_parent"
	                android:layout_height="80dip"
	                android:gravity="center_horizontal"
	                android:layout_weight="1"
	                android:orientation="vertical" >
	                <ToggleButton
	                    android:id="@+id/audioButton"
	                    android:gravity="center"
	                    style="@style/InCallButtonNewUi"
	                    android:layout_marginRight="6dip"
	                    android:background="@drawable/btn_compound_audio_newui"
	                    android:contentDescription="@string/onscreenAudioText" />
	                <TextView
                        android:id="@+id/audioButtonLabel"
                        style="@style/InCallExtraRowButtonLabelNewUI"
                        android:layout_gravity="center"
                        android:layout_marginRight="6dip"
                        android:singleLine="true"
                        android:layout_marginTop="-15dip"
                        android:text="@string/onscreenSpeakerText" />
	            </LinearLayout>
	            <LinearLayout
	                android:layout_width="match_parent"
	                android:layout_height="80dip"
	                android:layout_weight="1"
	                android:gravity="center_horizontal"
	                android:layout_gravity="center"
	                android:orientation="vertical" >
	                <ToggleButton
	                    android:id="@+id/dialpadButton"
	                    android:gravity="center"
	                    style="@style/InCallButtonNewUi"
	                    android:background="@drawable/btn_compound_keyboard_newui"
	                    android:contentDescription="@string/video_btn_dialer" />
	                <TextView
                        android:id="@+id/dialpadButtonLabel"
                        style="@style/InCallExtraRowButtonLabelNewUI"
                        android:layout_gravity="center"
                        android:layout_marginTop="-15dip"
                        android:singleLine="true"
                        android:text="@string/video_btn_dialer" />
				</LinearLayout>
				<LinearLayout
	                android:layout_width="match_parent"
	                android:layout_height="80dip"
	                android:layout_weight="1"
	                android:layout_gravity="center_horizontal"
	                android:orientation="vertical" >
	                <ToggleButton
	                    android:id="@+id/muteButton"
	                    style="@style/InCallButtonNewUi"
	                    android:layout_gravity="center"
	                    android:layout_marginLeft="6dip"
	                    android:background="@drawable/btn_compound_mute_newui"
	                    android:contentDescription="@string/onscreenMuteText" />
	                <TextView
                        android:id="@+id/muteButtonLabel"
                        style="@style/InCallExtraRowButtonLabelNewUI"
                        android:singleLine="true"
                        android:layout_gravity="center"
                        android:layout_marginLeft="4dip"
                        android:layout_marginTop="-15dip"
                        android:text="@string/video_mute" />
	            </LinearLayout>
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="84dip"
                android:paddingLeft="@dimen/button_cluster_side_padding_newui"
                android:paddingRight="@dimen/button_cluster_side_padding_newui"
                android:orientation="horizontal" >
                <Button
                    android:id="@+id/endButton"
                    style="@style/InCallEndButtonNewUI"
                    android:layout_marginTop="20dip"
                	android:layout_marginBottom="@dimen/button_cluster_side_padding_newui"
                    android:layout_width="match_parent"
                    android:text="@string/onscreenEndCallText"
                    android:textColor="@color/incall_call_banner_text_color"
                    android:contentDescription="@string/onscreenEndCallText"
                    android:background="@drawable/call_button_reject" />
            </LinearLayout>
        </LinearLayout>
    </RelativeLayout>
</RelativeLayout>

该布局定义了电话拨号及电话接听控制界面,电话拨号控制界面效果图如下:

电话接听控制界面效果图如下:

拨号键盘dtmf_twelve_key_dialer_stub布局文件为dtmf_twelve_key_dialer_view_newui.xml

  1. <com.android.phone.DTMFTwelveKeyDialerView  
  2.     xmlns:android="http://schemas.android.com/apk/res/android"  
  3.     android:id="@+id/dtmf_twelve_key_dialer_view_newui"  
  4.     android:layout_width="match_parent"  
  5.     android:layout_height="match_parent"  
  6.     android:orientation="vertical"  
  7.     android:layout_marginTop="1dip"  
  8.     android:background="@android:color/transparent"  
  9.     android:visibility="gone"  
  10.     >  
  11.     <!-- 号码显示控件 -->  
  12.     <EditText  
  13.         android:id="@+id/dtmfDialerField"  
  14.         android:layout_width="match_parent"  
  15.         android:layout_height="83dp"  
  16.         android:paddingRight="16dp"  
  17.         android:paddingLeft="16dp"  
  18.         android:singleLine="true"  
  19.         android:scrollHorizontally="true"  
  20.         android:textSize="40sp"  
  21.         android:gravity="center"  
  22.         android:freezesText="true"  
  23.         android:background="@android:color/transparent"  
  24.         android:textColor="@color/dtmf_dialer_display_text"  
  25.         android:focusableInTouchMode="false"  
  26.         android:clickable="false"/>  
  27.   
  28.     <!-- 拨号键盘 -->  
  29.     <include layout="@layout/dialpad_newui" />  
  30. </com.android.phone.DTMFTwelveKeyDialerView>  
<com.android.phone.DTMFTwelveKeyDialerView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/dtmf_twelve_key_dialer_view_newui"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:layout_marginTop="1dip"
    android:background="@android:color/transparent"
    android:visibility="gone"
    >
    <!-- 号码显示控件 -->
    <EditText
        android:id="@+id/dtmfDialerField"
        android:layout_width="match_parent"
        android:layout_height="83dp"
        android:paddingRight="16dp"
        android:paddingLeft="16dp"
        android:singleLine="true"
        android:scrollHorizontally="true"
        android:textSize="40sp"
        android:gravity="center"
        android:freezesText="true"
        android:background="@android:color/transparent"
        android:textColor="@color/dtmf_dialer_display_text"
        android:focusableInTouchMode="false"
        android:clickable="false"/>

    <!-- 拨号键盘 -->
    <include layout="@layout/dialpad_newui" />
</com.android.phone.DTMFTwelveKeyDialerView>

拨号键盘界面定义在dialpad_newui.xml中

  1. <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"  
  2.     android:id="@+id/dialpad"  
  3.     android:layout_width="match_parent"  
  4.     android:layout_height="262dip"  
  5.     android:layout_gravity="center_horizontal"  
  6.     android:background="@android:color/transparent"  
  7.     android:layout_weight="@integer/dialpad_layout_weight_dialpad">  
  8.     <TableRow  
  9.         android:layout_height="0px"  
  10.         android:layout_weight="1" >  
  11.         <ImageButton  
  12.             android:id="@+id/one"  
  13.             style="@style/DialpadButtonStyleNewui"  
  14.             android:contentDescription="@string/description_image_button_one"  
  15.             android:src="@drawable/dial_num_1_no_vm_newui"  
  16.             android:background="@drawable/btn_dialpad_1_bg"/>  
  17.         <ImageButton  
  18.             android:id="@+id/two"  
  19.             style="@style/DialpadButtonStyleNewui"  
  20.             android:contentDescription="@string/description_image_button_two"  
  21.             android:src="@drawable/dial_num_2_newui"  
  22.             android:background="@drawable/btn_dialpad_3_bg"/>  
  23.         <ImageButton  
  24.             android:id="@+id/three"  
  25.             style="@style/DialpadButtonStyleNewui"  
  26.             android:contentDescription="@string/description_image_button_three"  
  27.             android:src="@drawable/dial_num_3_newui"  
  28.             android:background="@drawable/btn_dialpad_1_bg"/>  
  29.     </TableRow>  
  30.   
  31.     <TableRow  
  32.         android:layout_height="0px"  
  33.         android:layout_weight="1">  
  34.         <ImageButton  
  35.             android:id="@+id/four"  
  36.             style="@style/DialpadButtonStyleNewui"  
  37.             android:contentDescription="@string/description_image_button_four"  
  38.             android:src="@drawable/dial_num_4_newui"  
  39.             android:background="@drawable/btn_dialpad_1_bg"/>  
  40.         <ImageButton  
  41.             android:id="@+id/five"  
  42.             style="@style/DialpadButtonStyleNewui"  
  43.             android:contentDescription="@string/description_image_button_five"  
  44.             android:src="@drawable/dial_num_5_newui"  
  45.             android:background="@drawable/btn_dialpad_3_bg"/>  
  46.         <ImageButton  
  47.             android:id="@+id/six"  
  48.             style="@style/DialpadButtonStyleNewui"  
  49.             android:contentDescription="@string/description_image_button_six"  
  50.             android:src="@drawable/dial_num_6_newui"  
  51.             android:background="@drawable/btn_dialpad_1_bg"/>  
  52.     </TableRow>  
  53.   
  54.     <TableRow  
  55.         android:layout_height="0px"  
  56.         android:layout_weight="1">  
  57.         <ImageButton  
  58.             android:id="@+id/seven"  
  59.             style="@style/DialpadButtonStyleNewui"  
  60.             android:contentDescription="@string/description_image_button_seven"  
  61.             android:src="@drawable/dial_num_7_newui"  
  62.             android:background="@drawable/btn_dialpad_1_bg"/>  
  63.         <ImageButton  
  64.             android:id="@+id/eight"  
  65.             style="@style/DialpadButtonStyleNewui"  
  66.             android:contentDescription="@string/description_image_button_eight"  
  67.             android:src="@drawable/dial_num_8_newui"  
  68.             android:background="@drawable/btn_dialpad_3_bg"/>  
  69.         <ImageButton  
  70.             android:id="@+id/nine"  
  71.             style="@style/DialpadButtonStyleNewui"  
  72.             android:contentDescription="@string/description_image_button_nine"  
  73.             android:src="@drawable/dial_num_9_newui"  
  74.             android:background="@drawable/btn_dialpad_1_bg"/>  
  75.     </TableRow>  
  76.   
  77.     <TableRow  
  78.         android:layout_height="0px"  
  79.         android:layout_weight="1">  
  80.         <ImageButton  
  81.             android:id="@+id/star"  
  82.             style="@style/DialpadButtonStyleNewui"  
  83.             android:contentDescription="@string/description_image_button_star"  
  84.             android:src="@drawable/dial_num_star_newui"  
  85.             android:background="@drawable/btn_dialpad_2_bg"/>  
  86.         <ImageButton  
  87.             android:id="@+id/zero"  
  88.             style="@style/DialpadButtonStyleNewui"  
  89.             android:contentDescription="@string/description_image_button_zero"  
  90.             android:src="@drawable/dial_num_0_no_plus_newui"  
  91.             android:background="@drawable/btn_dialpad_4_bg"/>  
  92.         <ImageButton  
  93.             android:id="@+id/pound"  
  94.             style="@style/DialpadButtonStyleNewui"  
  95.             android:contentDescription="@string/description_image_button_pound"  
  96.             android:src="@drawable/dial_num_pound_newui"  
  97.             android:background="@drawable/btn_dialpad_2_bg"/>  
  98.     </TableRow>  
  99. </TableLayout>  
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/dialpad"
    android:layout_width="match_parent"
    android:layout_height="262dip"
    android:layout_gravity="center_horizontal"
    android:background="@android:color/transparent"
    android:layout_weight="@integer/dialpad_layout_weight_dialpad">
    <TableRow
        android:layout_height="0px"
        android:layout_weight="1" >
        <ImageButton
            android:id="@+id/one"
            style="@style/DialpadButtonStyleNewui"
            android:contentDescription="@string/description_image_button_one"
            android:src="@drawable/dial_num_1_no_vm_newui"
            android:background="@drawable/btn_dialpad_1_bg"/>
        <ImageButton
            android:id="@+id/two"
            style="@style/DialpadButtonStyleNewui"
            android:contentDescription="@string/description_image_button_two"
            android:src="@drawable/dial_num_2_newui"
            android:background="@drawable/btn_dialpad_3_bg"/>
        <ImageButton
            android:id="@+id/three"
            style="@style/DialpadButtonStyleNewui"
            android:contentDescription="@string/description_image_button_three"
            android:src="@drawable/dial_num_3_newui"
            android:background="@drawable/btn_dialpad_1_bg"/>
    </TableRow>

    <TableRow
        android:layout_height="0px"
        android:layout_weight="1">
        <ImageButton
            android:id="@+id/four"
            style="@style/DialpadButtonStyleNewui"
            android:contentDescription="@string/description_image_button_four"
            android:src="@drawable/dial_num_4_newui"
            android:background="@drawable/btn_dialpad_1_bg"/>
        <ImageButton
            android:id="@+id/five"
            style="@style/DialpadButtonStyleNewui"
            android:contentDescription="@string/description_image_button_five"
            android:src="@drawable/dial_num_5_newui"
            android:background="@drawable/btn_dialpad_3_bg"/>
        <ImageButton
            android:id="@+id/six"
            style="@style/DialpadButtonStyleNewui"
            android:contentDescription="@string/description_image_button_six"
            android:src="@drawable/dial_num_6_newui"
            android:background="@drawable/btn_dialpad_1_bg"/>
    </TableRow>

    <TableRow
        android:layout_height="0px"
        android:layout_weight="1">
        <ImageButton
            android:id="@+id/seven"
            style="@style/DialpadButtonStyleNewui"
            android:contentDescription="@string/description_image_button_seven"
            android:src="@drawable/dial_num_7_newui"
            android:background="@drawable/btn_dialpad_1_bg"/>
        <ImageButton
            android:id="@+id/eight"
            style="@style/DialpadButtonStyleNewui"
            android:contentDescription="@string/description_image_button_eight"
            android:src="@drawable/dial_num_8_newui"
            android:background="@drawable/btn_dialpad_3_bg"/>
        <ImageButton
            android:id="@+id/nine"
            style="@style/DialpadButtonStyleNewui"
            android:contentDescription="@string/description_image_button_nine"
            android:src="@drawable/dial_num_9_newui"
            android:background="@drawable/btn_dialpad_1_bg"/>
    </TableRow>

    <TableRow
        android:layout_height="0px"
        android:layout_weight="1">
        <ImageButton
            android:id="@+id/star"
            style="@style/DialpadButtonStyleNewui"
            android:contentDescription="@string/description_image_button_star"
            android:src="@drawable/dial_num_star_newui"
            android:background="@drawable/btn_dialpad_2_bg"/>
        <ImageButton
            android:id="@+id/zero"
            style="@style/DialpadButtonStyleNewui"
            android:contentDescription="@string/description_image_button_zero"
            android:src="@drawable/dial_num_0_no_plus_newui"
            android:background="@drawable/btn_dialpad_4_bg"/>
        <ImageButton
            android:id="@+id/pound"
            style="@style/DialpadButtonStyleNewui"
            android:contentDescription="@string/description_image_button_pound"
            android:src="@drawable/dial_num_pound_newui"
            android:background="@drawable/btn_dialpad_2_bg"/>
    </TableRow>
</TableLayout>

效果图如下所示:

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值