From 164ddd192af70ff07a4ad733180599e081a59046 Mon Sep 17 00:00:00 2001 From: calderwoodra Date: Thu, 1 Mar 2018 16:59:22 -0800 Subject: Implemented DialerFloatingActionButton Implemented wrapper class for FloatingActionButton to resolve some of FloatingActinButton's many issues. One of which is alllowing clicks while animating that was causing a crash in NUI. This change also fixes an issue with the dialpad exit animation. Bug: 73995512 Test: Robolectric and Espresso don't support these kinds of tests very well PiperOrigin-RevId: 187556390 Change-Id: I4cb7c2346a0ef09f2f3d8b48e7e14d01460cd1a7 --- java/com/android/dialer/main/impl/MainSearchController.java | 5 +++++ java/com/android/dialer/main/impl/res/layout/main_activity.xml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'java/com/android/dialer/main/impl') diff --git a/java/com/android/dialer/main/impl/MainSearchController.java b/java/com/android/dialer/main/impl/MainSearchController.java index a6bdec5eb..993ed3d8c 100644 --- a/java/com/android/dialer/main/impl/MainSearchController.java +++ b/java/com/android/dialer/main/impl/MainSearchController.java @@ -136,6 +136,11 @@ public class MainSearchController implements SearchBarListener { } searchFragment.setQuery("", CallInitiationType.Type.DIALPAD); + // Split the transactions so that the dialpad fragment isn't popped off the stack when we exit + // search. We do this so that the dialpad actually animates down instead of just disappearing. + transaction.commit(); + transaction = mainActivity.getFragmentManager().beginTransaction(); + // Show Dialpad if (getDialpadFragment() == null) { DialpadFragment dialpadFragment = new DialpadFragment(); diff --git a/java/com/android/dialer/main/impl/res/layout/main_activity.xml b/java/com/android/dialer/main/impl/res/layout/main_activity.xml index b69625e63..0883acebc 100644 --- a/java/com/android/dialer/main/impl/res/layout/main_activity.xml +++ b/java/com/android/dialer/main/impl/res/layout/main_activity.xml @@ -37,7 +37,7 @@ android:layout_height="match_parent" android:layout_above="@+id/bottom_nav_bar"/> -