mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-05 12:07:44 +08:00
Updated extended floating action button to turn off word wrapping only if animating expand/shrink action.
PiperOrigin-RevId: 241594089
This commit is contained in:
parent
63cd0d8428
commit
c3e9cb45a0
@ -176,9 +176,6 @@ public class ExtendedFloatingActionButton extends MaterialButton implements Atta
|
||||
context, a, R.styleable.ExtendedFloatingActionButton_shrinkMotionSpec);
|
||||
|
||||
a.recycle();
|
||||
|
||||
// Eliminates the word wrapping when the FAB extended state change is animating.
|
||||
setHorizontallyScrolling(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -652,6 +649,8 @@ public class ExtendedFloatingActionButton extends MaterialButton implements Atta
|
||||
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
// Eliminates the word wrapping when the FAB is being extended or shrunk.
|
||||
setHorizontallyScrolling(true);
|
||||
currentCollapseExpandAnimator = animation;
|
||||
cancelled = false;
|
||||
}
|
||||
@ -663,6 +662,7 @@ public class ExtendedFloatingActionButton extends MaterialButton implements Atta
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
setHorizontallyScrolling(false);
|
||||
currentCollapseExpandAnimator = null;
|
||||
if (cancelled || listener == null) {
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user