Fix media layout to avoid awkward expansion transitions.
* Media notifications have always transitioned by crossfading between the two containers, which means that the leftmost 3 icons in the expanded and collapsed state crossfade. If those match, the animation looks good, otherwise it's a little sad. This was broken in the layout because the expanded state used padding instead of a margin, which made it look OK only if there was an action added to the left in the expanded state. This fix preserves the old behavior. * I also fixed an issue on larger display settings where we would pad both the start and end of the actions, causing odd truncation. Adding nesting and moving the margin to the start wirks for RTL and avoids unnecessary padding. * Finally, I reduced the start padding by 6dp, the visual inset of stock media action icons, which will ensure that those icons align with text. While this could make larger icons misaligned, I can't find any examples of apps that use media notifications (as opposed to players) using non-stock icons. Fixes: 188665741 Test: manual Change-Id: I2f4057e91e6f519d89f197bfe93a966217ff2876
Loading
Please register or sign in to comment