From 594b864c336dd5cf1dfcbaff2c979201dcd6985e Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Thu, 19 Feb 2015 17:10:54 -0800 Subject: Postpone enabling of layout transition Enable layout transition only when call shortcut is dismissed, to prevent the layout from sliding down at startup. Change-Id: Id218b5e3eb89b5df5aee30f35c036d2860541294 --- src/com/android/dialer/list/ListsFragment.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java index b303d0011..9ae5c57f5 100644 --- a/src/com/android/dialer/list/ListsFragment.java +++ b/src/com/android/dialer/list/ListsFragment.java @@ -356,6 +356,11 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste prefs.edit().putLong(KEY_LAST_DISMISSED_CALL_SHORTCUT_DATE, mLastCallShortcutDate) .apply(); fetchCalls(); + + LayoutTransition transition = mOverlappingPaneLayout.getLayoutTransition(); + // Turns on animations for all types of layout changes so that they occur for + // height changes. + transition.enableTransitionType(LayoutTransition.CHANGING); } public void addOnPageChangeListener(OnPageChangeListener onPageChangeListener) { @@ -420,11 +425,6 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste paneLayout.setPanelSlideCallbacks(mPanelSlideCallbacks); paneLayout.setIntermediatePinnedOffset( ((HostInterface) getActivity()).getActionBarController().getActionBarHeight()); - - LayoutTransition transition = paneLayout.getLayoutTransition(); - // Turns on animations for all types of layout changes so that they occur for - // height changes. - transition.enableTransitionType(LayoutTransition.CHANGING); } public SpeedDialFragment getSpeedDialFragment() { -- cgit v1.2.3