-
-
Save Foosvald/b6639f12d847803ca3eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuranimation configuranimation = new Configuranimation(this); | |
// Add what you want to configure like this | |
configuranimation | |
.addAnimationConfig("Expander") | |
.addDuration(0, 1000, 0, 20) | |
.addInterpolator() | |
.setCallback(new Callback() { | |
@Override | |
public void run() { | |
expandView(); | |
}}); | |
// Or maybe like this | |
configuranimation | |
.addAnimationConfig("Thumb Start") | |
.addFloatProperty("Start Scale X", 0f, 2f, 1f, 0.1f) | |
.addFloatProperty("Start Scale Y", 0f, 2f, 1f, 0.1f) | |
.addDpProperty("Start X", 0, 400, 0, 4) | |
.addDpProperty("Start Y", 0, 1000, 0, 10) | |
.setDebouncingEnabled(false); | |
// Retrieve values again | |
AnimationConfig config = configuranimation.getAnimationConfig("Thumb Start"); | |
thumbView.setX(config.getDpPropertyInPx("Start X")); | |
thumbView.setY(config.getDpPropertyInPx("Start Y")); | |
thumbView.setScaleX(config.getFloatProperty("Start Scale X")); | |
thumbView.setScaleY(config.getFloatProperty("Start Scale Y")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment