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
Loading
Please register or sign in to comment