summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorSai Cheemalapati <saicheems@google.com>2014-06-04 16:36:29 -0700
committerSai Cheemalapati <saicheems@google.com>2014-06-06 12:47:06 -0700
commit23dc1825ccd186918b45e441b1618cd06acf4eb1 (patch)
treecf3f022934dadd92383ffb4002f97c3d2dae68f4 /res/layout
parent39b498d65e75f4f5344bf55c169a9412c477aa42 (diff)
downloadpackages_apps_InCallUI-23dc1825ccd186918b45e441b1618cd06acf4eb1.tar.gz
packages_apps_InCallUI-23dc1825ccd186918b45e441b1618cd06acf4eb1.tar.bz2
packages_apps_InCallUI-23dc1825ccd186918b45e441b1618cd06acf4eb1.zip
Moving FAB logic to ContactsCommon.
Moved FAB to ContactsCommon. Cleaned up FAB Controller. Replaced implementation of FAB in InCallUI with controller. Prevented animations from happening again in InCallUI on orientaton change. FAB also repositions correctly on orientation change in InCallUI. Bug: 15386162 Change-Id: I8ea4ef8acb49a83dabe5c18223ce5bac28260824
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/call_card.xml77
-rw-r--r--res/layout/call_card_content.xml77
2 files changed, 86 insertions, 68 deletions
diff --git a/res/layout/call_card.xml b/res/layout/call_card.xml
index 658cc493..820397d5 100644
--- a/res/layout/call_card.xml
+++ b/res/layout/call_card.xml
@@ -36,77 +36,18 @@
android:layout_height="0dp"
android:layout_weight="5" >
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <LinearLayout
- android:id="@+id/primary_call_info_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:elevation="@dimen/primary_call_elevation"
- android:background="@color/incall_call_banner_background_color"
- android:paddingTop="@dimen/call_banner_primary_call_container_top_padding"
- android:clipChildren="false"
- android:clipToPadding="false" >
-
- <include layout="@layout/primary_call_info" />
-
- <fragment android:name="com.android.incallui.CallButtonFragment"
- android:id="@+id/callButtonFragment"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
- </LinearLayout>
-
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1">
-
- <!-- Contact photo for primary call info -->
- <ImageView android:id="@+id/photo"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="top|center_horizontal"
- android:scaleType="centerCrop"
- android:contentDescription="@string/contactPhoto"
- android:src="@drawable/picture_unknown"/>
-
- <!-- Secondary "Call info" block, for the background ("on hold") call. -->
- <include layout="@layout/secondary_call_info" />
-
- <fragment android:name="com.android.incallui.DialpadFragment"
- android:id="@+id/dialpadFragment"
- android:layout_width="match_parent"
- android:layout_height="match_parent" />
-
- <fragment android:name="com.android.incallui.AnswerFragment"
- android:id="@+id/answerFragment"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_alignParentBottom="true"
- android:layout_centerHorizontal="true"
- android:gravity="top"
- android:layout_gravity="bottom|center_horizontal"
- android:layout_marginBottom="@dimen/glowpadview_margin_bottom"
- android:visibility="gone" />
-
- </FrameLayout>
-
- </LinearLayout>
+ <include layout="@layout/call_card_content" />
<FrameLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:id="@+id/floating_end_call_action_button_container"
+ android:layout_width="@dimen/floating_action_button_width"
+ android:layout_height="@dimen/floating_action_button_height"
+ android:layout_marginBottom="@dimen/end_call_button_margin_bottom"
android:layout_gravity="bottom|center">
- <ImageButton android:id="@+id/endButton"
- android:layout_width="@dimen/floating_action_button_width"
- android:layout_height="@dimen/floating_action_button_height"
- android:layout_marginBottom="@dimen/end_call_button_margin_bottom"
+ <ImageButton android:id="@+id/floating_end_call_action_button"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:background="@drawable/end_call_background"
android:src="@drawable/fab_ic_end_call"
android:contentDescription="@string/onscreenEndCallText" />
@@ -117,13 +58,13 @@
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/end_call_button_margin_bottom"
android:layout_gravity="bottom|right">
<ImageButton android:id="@+id/handoffButton"
android:enabled="false"
android:layout_width="@dimen/floating_action_button_width"
android:layout_height="@dimen/floating_action_button_height"
- android:layout_marginBottom="@dimen/end_call_button_margin_bottom"
android:background="@drawable/floating_handoff_button_compound_background"
android:src="@drawable/ic_in_call_pstn" />
</FrameLayout>
diff --git a/res/layout/call_card_content.xml b/res/layout/call_card_content.xml
new file mode 100644
index 00000000..cb6f5330
--- /dev/null
+++ b/res/layout/call_card_content.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ ~ Copyright (C) 2014 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
+
+ <LinearLayout
+ android:id="@+id/primary_call_info_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:elevation="@dimen/primary_call_elevation"
+ android:background="@color/incall_call_banner_background_color"
+ android:paddingTop="@dimen/call_banner_primary_call_container_top_padding"
+ android:clipChildren="false"
+ android:clipToPadding="false" >
+
+ <include layout="@layout/primary_call_info" />
+
+ <fragment android:name="com.android.incallui.CallButtonFragment"
+ android:id="@+id/callButtonFragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ </LinearLayout>
+
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" >
+
+ <!-- Contact photo for primary call info -->
+ <ImageView android:id="@+id/photo"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="top|center_horizontal"
+ android:scaleType="centerCrop"
+ android:contentDescription="@string/contactPhoto"
+ android:src="@drawable/picture_unknown" />
+
+ <!-- Secondary "Call info" block, for the background ("on hold") call. -->
+ <include layout="@layout/secondary_call_info" />
+
+ <fragment android:name="com.android.incallui.DialpadFragment"
+ android:id="@+id/dialpadFragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <fragment android:name="com.android.incallui.AnswerFragment"
+ android:id="@+id/answerFragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="top"
+ android:layout_gravity="bottom|center_horizontal"
+ android:layout_marginBottom="@dimen/glowpadview_margin_bottom"
+ android:visibility="gone" />
+
+ </FrameLayout>
+
+</LinearLayout>