conradchen 868f8aaba3 [Tab] Fix setting tab indicator and its full-width flag
1. When a new tab indicator drawable is set, we didn't correctly restore the previous set indicator height to the new drawable, or set the drawing bound to the intrinsic height of the drawable, if the indicator height was not specified. This result in a 0-height drawing bound after setting the tab indicator, which makes it disappear and can never go back if the tab indicator gravity is not "stretch" (which will recalculate the height after moving the indicator). Fixes this by correctly set the drawing bounds after a new tab indicator drawable is set.

2. After we set full-width flag of tab indicator, the width won't be updated until we move the tab indicator. Fixes this by explicitly triggering the recalculation of tab indicator's drawing bound after changing the flag.

Resolves: https://github.com/material-components/material-components-android/issues/2354
PiperOrigin-RevId: 397823617
2021-09-21 08:14:25 -07:00
..
2021-08-25 14:55:54 -04:00
2021-08-24 15:41:06 -04:00