Updated extended floating action button to turn off word wrapping only if animating expand/shrink action.

PiperOrigin-RevId: 241594089
This commit is contained in:
raajkumars 2019-04-02 16:38:34 -04:00 committed by ikim24
parent 63cd0d8428
commit c3e9cb45a0

View File

@ -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;