From 6b55340d79f41e65dae7327f9a9a90d3092fb5ca Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Wed, 5 Mar 2014 14:43:28 -0800 Subject: Fix jank in no favorites screen when showing/hiding dialpad DO NOT MERGE Reintroduce a spacer view (under the no favorites view) that is the same height as the search box + its margins, so that the no favorites view does not shift when the dialpad is shown/hidden Bug: 13341743 Change-Id: I00171b5fd546e30394c95d31976483d124f75f3b (cherry picked from commit b0d197653fcdd2526ba9b85d613e4968ebbef2ab) --- res/layout/dialtacts_activity.xml | 6 +++++ res/layout/phone_favorites_fragment.xml | 1 - res/layout/phone_no_favorites.xml | 14 ++++------- src/com/android/dialer/DialtactsActivity.java | 34 +++++++++++++++++++++++++-- 4 files changed, 42 insertions(+), 13 deletions(-) diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml index 8f9f39cd2..6eea63350 100644 --- a/res/layout/dialtacts_activity.xml +++ b/res/layout/dialtacts_activity.xml @@ -140,6 +140,12 @@ android:layout_alignParentRight="true" /> + diff --git a/res/layout/phone_favorites_fragment.xml b/res/layout/phone_favorites_fragment.xml index 23987a813..d1ff3d75a 100644 --- a/res/layout/phone_favorites_fragment.xml +++ b/res/layout/phone_favorites_fragment.xml @@ -58,5 +58,4 @@ android:layout_alignParentBottom="true" layout="@layout/phone_no_favorites" android:visibility="gone"/> - diff --git a/res/layout/phone_no_favorites.xml b/res/layout/phone_no_favorites.xml index 1a0079f52..b95afd197 100644 --- a/res/layout/phone_no_favorites.xml +++ b/res/layout/phone_no_favorites.xml @@ -18,7 +18,6 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="vertical" android:minHeight="?android:attr/listPreferredItemHeight"> - + android:layout_centerInParent="true"> - + android:layout_marginBottom="14dp" + android:contentDescription="@string/no_favorites"/>