From 4ed7db87e6c0e71b2f656e77de938f3579bc36bf Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Fri, 27 Sep 2013 17:04:00 -0700 Subject: Add slide up transition when call shortcut is dismissed Add animations to the favorites list view that occur when the most recent call shortcut is dismissed. The previous implementation would call removeAllViews on the call shortcut once it had been dismissed. This would cause the rest of the list view to appear to jump up into place instead of animating smoothly. Instead, we now use the same animation logic in PhoneFavoritesFragment by saving the offsets of the rest of the list items once the shortcut is dismissed, and then assigning animations to the new list items when a new dataset arrives in onCallsFetched. Also, additional logic needs to be added to the animation logic because call shortcuts are taller than regular contacts. The previous code made the assumption that the removed item would always be the same height as all other list items, but this is not the case here. We thus save the height of the removed call shortcut as a special value in mItemIdTopMap and retrieve it to correctly calculate translation offsets instead. Bug: 10915363 Change-Id: I81bd711c5a3a34bdb4c4f5a311b91fb6ee1539c0 --- res/layout/phone_favorites_fragment.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'res') diff --git a/res/layout/phone_favorites_fragment.xml b/res/layout/phone_favorites_fragment.xml index f518f0b92..363565a5d 100644 --- a/res/layout/phone_favorites_fragment.xml +++ b/res/layout/phone_favorites_fragment.xml @@ -27,7 +27,7 @@ -- cgit v1.2.3