asyl / arcanimator Goto Github PK
View Code? Open in Web Editor NEWArcAnimator helps to create arc transition animation: 2.3.+
License: MIT License
ArcAnimator helps to create arc transition animation: 2.3.+
License: MIT License
Sample code below will not compile since start()
method doesn't return ArcAnimator
object.
ArcAnimator arcAnimator = ArcAnimator.createArcShift(clipView, endX, endY, DEGREE, SIDE)
.setDuration(500)
.start();
``
Hey,
I want to use the ArcAnimator library in my app for animating a fab button. However I am unable to set it up the way I like it.
In my code I use the ArcAnimator as follows but it does not work.
private ArcAnimator animation;
public void prepareAnim() {
animation = ArcAnimator.createArcAnimator(
fab,
x,
y,
FAB_ANIM_ANGLE,
FAB_ANIM_SIDE
);
animation.setDuration(FAB_ANIM_DURATION);
}
public void runAnim() {
animation.start();
}
@OverRide
protected void onCreate() {
......
prepareAnim();
Button button = ......;
button.setOnClickListener(new View.OnClickListener() {
@OverRide
public void onClick(View
runAnim();
}
});
}
....
}
This does not seem to work. I do not want to setup the animation and then immediately run it when I press the button because it causes a small delay in the animation on older devices. So instead I'm setting up the animation before hand.
Can you please help me out understand how I can get this to work?
Sent from Mailbird
Hello I face a problem after i generate a signed APK, The animation not works my minimum SDK 17
Error:A problem occurred configuring project ':arcsample'.
Could not resolve all dependencies for configuration ':arcsample:_debugCompile'.
Could not find com.github.ozodrukh:CircularReveal:1.0.4.
Searched in the following locations:
https://jcenter.bintray.com/com/github/ozodrukh/CircularReveal/1.0.4/CircularReveal-1.0.4.pom
https://jcenter.bintray.com/com/github/ozodrukh/CircularReveal/1.0.4/CircularReveal-1.0.4.aar
where is supportanimator class? that class is not found
I could not understand why so many stars here for this library? :-)
Hi.
I want to show Fab_sheet in center of screen.
How can i do it. Thank you
I've had problems using proguard, I've solved adding the rule:
-keep class io.codetail.animation.arcanimator.** { *; }
I would like to make something like the video provided in the transition loop
Sample app crashes when animation is completed.
java.lang.IllegalArgumentException: View must be inside RevealFrameLayout or RevealLinearLayout.
at io.codetail.animation.ViewAnimationUtils.createCircularReveal(ViewAnimationUtils.java:52)
at io.codetail.arcsample.TransitionLoopFragment.appearBluePair(TransitionLoopFragment.java:95)
at io.codetail.arcsample.TransitionLoopFragment$1$1.onAnimationEnd(TransitionLoopFragment.java:82)
at com.nineoldandroids.animation.ValueAnimator.endAnimation(ValueAnimator.java:1034)
at com.nineoldandroids.animation.ValueAnimator.access$900(ValueAnimator.java:43)
at com.nineoldandroids.animation.ValueAnimator$AnimationHandler.handleMessage(ValueAnimator.java:669)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
I am getting this error every time. How can I solve this?
Hello
I'm trying to use this library for displaying realtime degree(-90 to 90) from sensor.
So I made a method like below.
When I set -90 degree (defualt is 0), mSide is set as Side.RIGHT.
Problem is when I run this application (for 3 cases: -90, 0, 90), it goes clockwise direction
So help me please. Sorry for poor English
int [] xy0 = {500, 45};
int [] xyN90 = {45, 510};
int [] xyP90 = {950, 510};
int previousDegree = 0;
private void nowDegree(int nowDegree){
int x = 0 , y = 0;
setSide(nowDegree);
startX = ViewHelper.getTranslationX(mIvNow);
startY = ViewHelper.getTranslationY(mIvNow);
ViewHelper.setTranslationX(mIvNow, startX);
ViewHelper.setTranslationY(mIvNow, startY);
if(nowDegree == -90){
x = xyN90[0];
y = xyN90[1];
}else if(nowDegree == 0){
x = xy0[0];
y = xy0[1];
}else if(nowDegree == 90){
x = xyP90[0];
y = xyP90[1];
}
ArcAnimator arcAnimator = ArcAnimator.createArcAnimator(mIvNow, x, y, Math.abs(nowDegree-previousDegree), mSide)
.setDuration(1000);
arcAnimator.start();
mIvNow.setX(x);
mIvNow.setY(y);
previousDegree = nowDegree;
}
private void setSide(int degree){
if(degree>previousDegree)
mSide = Side.LEFT;
else
mSide = Side.RIGHT;
}
Hi Bro,This is a great lib.
wish to use it with gradle.
Hello, I looked at NineOldAndroids repository and saw that author said this:
NineOldAndroids is deprecated. No new development will be taking place. Existing versions will (of course) continue to function. New applications should use minSdkVersion="14" or higher which has access to the platform animation APIs.
ArcAnimator suports API>=14, so looks like you can remove this dependency, or this is will require too much work or API of NineOldAndroids is much nice then system provided? Do you have any plans on this?
I am asking because some other libraries depend on ArcAnimator and nineoldandroid increases method count.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.