Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How change speed animation #15

Closed
Leeeeerich opened this issue Mar 4, 2021 · 3 comments
Closed

How change speed animation #15

Leeeeerich opened this issue Mar 4, 2021 · 3 comments

Comments

@Leeeeerich
Copy link

Leeeeerich commented Mar 4, 2021

Hi! How I speed up the animation?

I use:

app:efab_openingAnimationDurationMs="100" app:efab_closingAnimationDurationMs="100"

but this only works on the first opening, on the second and subsequent ones, the animation speed returns to the initial one. I tried to install both through the markup and programmatically.

@kabumere
Copy link
Member

kabumere commented Mar 4, 2021

Hey @Leeeeerich,

The animation durations and properties can be set on each of the individual Views. I have linked to some relevant properties below that should help you, but please view the JavaDoc or KDoc for each class in the library, as properties other than those listed below can indirectly affect animations as well (for instance, the translationX value of a Label will determine how far it travels horizontally during animations). The documentation should explain exactly what each property does and how it influences animations.

ExpandableFab:
Opening Animation Duration
Closing Animation Duration
Closing Anticipate Tension

FabOption:
Opening Animation Duration
Closing Animation Duration
Opening Overshoot Tension

Label:
Hidden to Visible Animation Duration
Visible to Hidden Animation Duration
Overshoot Tension

@kabumere
Copy link
Member

kabumere commented Mar 7, 2021

Hey @Leeeeerich,

Have the links above helped you?

@Leeeeerich
Copy link
Author

Hey! Thanks. It is was very hard, but understand. Ok, if you need to speed up opening menu: label_hiddenToVisibleAnimationDurationMs and fab_openingAnimationDurationMs

My fab with open and close:

<com.nambimobile.widgets.efab.FabOption
                android:id="@+id/eFab"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:fab_openingAnimationDurationMs="25"
                app:fab_closingAnimationDurationMs="25"
                app:label_hiddenToVisibleAnimationDurationMs="75"
                app:label_visibleToHiddenAnimationDurationMs="75"
                app:fab_color="@android:color/white"
                app:fab_icon="@drawable/ic_post"
                app:fab_orientation="portrait"
                app:label_backgroundColor="@android:color/white"
                app:label_text="@string/post"
                app:label_textColor="@color/blackBlueColor" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants