Closed shall-code closed 7 years ago
I can confirm I observed some out of screen unexpected animations while playing around.
@sbhall3 , did you solve this?
This is currently the expected behavior. The sheet must expand either to the left or the right, whichever side has more space. Expanding the sheet directly upwards hasn't been implemented because it isn't a use case in the material design guidelines.
Playing with the CardView layout_width parameter as well as the card's layout_gravity and the layout_gravity of the FAB gives unexpected results. For example, set the FAB position to bottom (center) and the card to center. The FAB click animation then expands off to either the LEFT (if the card layout_width="250dp") or the RIGHT (if the card layout_width="300dp"). With the card layout_width="match_parent" its final position is mostly off screen further to the right. The expected behavior here should be animating neither left nor right, which can be understood that the magnitude of the x translation is too large, and the material sheet animation is not properly abiding by the layout specification. The y translation magnitude likely also needs review.
Layout file: