Commit b6b895a
committed
[Button] Fix icon textStart/End alignment with multiline text
When calculating text width to decide the icon position with textStart/End alignment, we missed accounting for multiline text. Fixes this by calculating each line's width separately and take the widest one to decide the icon position.
Resolves #2007
PiperOrigin-RevId: 4409821891 parent 05be1b9 commit b6b895a
File tree
1 file changed
+18
-3
lines changed- lib/java/com/google/android/material/button
1 file changed
+18
-3
lines changedLines changed: 18 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
571 | | - | |
| 571 | + | |
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
615 | | - | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
616 | 625 | | |
617 | | - | |
| 626 | + | |
618 | 627 | | |
619 | 628 | | |
620 | 629 | | |
| |||
643 | 652 | | |
644 | 653 | | |
645 | 654 | | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
646 | 661 | | |
647 | 662 | | |
648 | 663 | | |
| |||
0 commit comments