summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2014-08-12 13:14:12 -0700
committerTyler Gunn <tgunn@google.com>2014-08-12 13:14:12 -0700
commitcb28896062ba4b6bd25f720e2c278ef91d209d83 (patch)
tree7ce0356ffe4f56d442cceb939f3731deba2cf2f4 /res/layout
parent2712f36c29fb94cdb2613e56c7bc842299f8cf03 (diff)
downloadpackages_apps_InCallUI-cb28896062ba4b6bd25f720e2c278ef91d209d83.tar.gz
packages_apps_InCallUI-cb28896062ba4b6bd25f720e2c278ef91d209d83.tar.bz2
packages_apps_InCallUI-cb28896062ba4b6bd25f720e2c278ef91d209d83.zip
Improvements to InCall UI view inflation performance.
1. Flattened the view hierarchy to remove a few layers of nested frames. Removed call_card.xml since it was essentially just nested frames. 2. Deferring inflation of the dialpad until it is actually needed. Bug: 16594582 Change-Id: I34a03dc3d95431bd0ba1d784a64ae3929f240d46
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/call_card.xml59
-rw-r--r--res/layout/call_card_content.xml30
2 files changed, 28 insertions, 61 deletions
diff --git a/res/layout/call_card.xml b/res/layout/call_card.xml
deleted file mode 100644
index e0810659..00000000
--- a/res/layout/call_card.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- ~ Copyright (C) 2013 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:id="@+id/call_card"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <!-- The main content of the CallCard is either one or two "call info"
- blocks, depending on whether one or two lines are in use.
-
- The call_info blocks are stacked vertically inside a CallCard (LinearLayout),
- each with layout_weight="1". If only one line is in use (i.e. the
- common case) then the 2nd call info will be GONE and thus the 1st one
- will expand to fill the full height of the CallCard. -->
-
- <!-- Primary "call card" block, for the foreground call. -->
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="5" >
-
- <include layout="@layout/call_card_content" />
-
- <FrameLayout
- 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/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" />
-
- </FrameLayout>
-
- </FrameLayout>
-
-</LinearLayout>
diff --git a/res/layout/call_card_content.xml b/res/layout/call_card_content.xml
index da21c30d..ec32d986 100644
--- a/res/layout/call_card_content.xml
+++ b/res/layout/call_card_content.xml
@@ -20,6 +20,15 @@
android:layout_width="match_parent"
android:layout_height="match_parent" >
+ <!-- The main content of the CallCard is either one or two "call info"
+ blocks, depending on whether one or two lines are in use.
+
+ The call_info blocks are stacked vertically inside a CallCard (LinearLayout),
+ each with layout_weight="1". If only one line is in use (i.e. the
+ common case) then the 2nd call info will be GONE and thus the 1st one
+ will expand to fill the full height of the CallCard. -->
+
+ <!-- Primary "call card" block, for the foreground call. -->
<LinearLayout
android:id="@+id/primary_call_info_container"
android:layout_width="match_parent"
@@ -92,8 +101,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />
- <fragment android:name="com.android.incallui.DialpadFragment"
- android:id="@+id/dialpadFragment"
+ <!-- Placeholder for the dialpad which is replaced with the dialpad fragment when shown. -->
+ <FrameLayout
+ android:id="@+id/dialpadFragmentContainer"
android:layout_below="@id/primary_call_info_container"
android:layout_gravity="bottom|center_horizontal"
android:layout_alignParentBottom="true"
@@ -108,4 +118,20 @@
android:layout_gravity="bottom|center_horizontal"
android:layout_marginBottom="@dimen/glowpadview_margin_bottom"
android:visibility="gone" />
+
+ <FrameLayout
+ 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_alignParentBottom="true"
+ android:layout_centerHorizontal="true" >
+
+ <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" />
+ </FrameLayout>
</RelativeLayout>