Coder Social home page Coder Social logo

arcanimator's People

Contributors

asyl avatar giolin avatar jitpack-io avatar korsander avatar laggedhero avatar maxirosson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arcanimator's Issues

Update README.md file

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();
``

Preparing and starting animation separately

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

Signed Apk Issue

Hello I face a problem after i generate a signed APK, The animation not works my minimum SDK 17

Closed

I could not understand why so many stars here for this library? :-)

Proguard

I've had problems using proguard, I've solved adding the rule:
-keep class io.codetail.animation.arcanimator.** { *; }

Sample app crashes

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)

side when using ArcAnimator

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

NineOldAndroids dependency

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.