Easy drawable animation using beziers curves.
Easy drawable animation using beziers curves.
ToggleDrawable helps to create animated drawable transitions using a minimalistic and clean API. The implementation relies on bezier curves instead of SVG graphics, and is compatible below API 19.
The library provides a few implementations like SearchArrowDrawable, SearchCrossDrawable or DrawerArrowDrawable:
ToggleDrawable drawable = new SearchArrowDrawable(context);
mImageView.setImageDrawable(drawable);
drawable.setProgress(...); // animate
You can easily create your own transitions by passing several Bezier curves to ToggleDrawable:
ToggleDrawable drawable = new ToggleDrawable(context);
drawable.add(, );
drawable.add(, );
Or by simpy subclassing ToggleDrawable instead:
…
Look at the sample.
This repositery can be found on JitPack:
https://jitpack.io/#renaudcerrato/ToggleDrawable
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
Add the dependency:
dependencies {
compile 'com.github.renaudcerrato:ToggleDrawable:1.0.2'
}
No open issues yet, or sync has not completed.