ArcAnimator helps to create arc transition animation: 2.3.+

Overview

ArcAnimator

ArcAnimator helps to create arc transition animation: 14+

|

ArcAnimator Demo | TransitionLoop Demo*

*TransitionLoop Prototype by Min-Sang Choi Dribbble

Usage

Add the library to your project:

  compile 'com.github.asyl.animation:arcanimator:1.0.0'

Then use it in your project code:

  //set up clipView and coordinates where clipView will move
  ArcAnimator.createArcAnimator(clipView, endX, endY, DEGREE, SIDE)
                    .setDuration(500)
                    .start();
  
  //or specify nestView for clipView. Animator will take center x,y coordinates of nestView
  ArcAnimator.createArcAnimator(clipView, nestView, DEGREE, SIDE)
                    .setDuration(500)
                    .start();

Download

JitPack

To include this library in your project add to your build.gradle:

	repositories {
	    maven { url "https://jitpack.io" }
	}
	
	dependencies {
	    compile 'com.github.asyl:ArcAnimator:v1.0.0'
	}

Dependency

  • Ozodrukh's CircularReveal helped to create awesome TransitionLoop Demo

Thanks

I want to thank Sherzod Agzamov for helping to solve some Geometry problems & Ozodrukh for support and tips that help to make this library.

License

The MIT License (MIT)

Copyright (c) 2015 Asylbek Isakov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Comments
  • Update README.md file

    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();
    ``
    
    opened by dmytrodanylyk 2
  • side when using ArcAnimator

    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;
    }
    
    opened by leon716 1
  • Preparing and starting animation separately

    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

    opened by aashreys 1
  • Error:A problem occurred configuring project ':arcsample'.

    Error:A problem occurred configuring project ':arcsample'.

    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

    opened by audiebantzhan 1
  • Sample app crashes

    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)
    
    opened by dmytrodanylyk 1
  • NineOldAndroids dependency

    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.

    opened by maxim-pandra 2
Releases(v1.0.0)
Owner
Asyl Isakov
Asyl Isakov
Android library to control Transition animates. A simple way to create a interactive animation.

TransitionPlayer Android library to control Transition animates. A simple way to create a interactive animation. Demo1 SimpleTransition Code: ....

林法鑫 1.2k Dec 17, 2022
This is a simple util to create Activity transition animation

TransitionHelper This is a simple util to create Activity transition animation API compatible with Android 2.2+ 中文说明 Screenshots How to use 1.startAct

ImmortalZ 1.6k Dec 12, 2022
3D animation examples for support-v4 Fragment transition.

FragmentAnimations Animation examples for support.v4.Fragment transition. These animations do not depends on any external libraries. Usage Example In

Keita Kajiwara 1.1k Dec 14, 2022
🪐 Jetpack Compose animation library that allows you to implement animations such as shared element transition.

Orbitary ?? Jetpack Compose animation library that allows you to implement animations such as shared element transition. Download Gradle Add the depen

Jaewoong Eum 503 Dec 30, 2022
🪐 Jetpack Compose animation library that allows you to implement animations such as shared element transition.

?? Jetpack Compose animation library that allows you to implement animations such as shared element transition.

Jaewoong Eum 504 Jan 2, 2023
Allows the easy creation of animated transition effects when the state of Android UI has changed

android-transition Android-Transition allows the easy creation of view transitions that reacts to user inputs. The library is designed to be general e

Kai 615 Nov 14, 2022
Android Transition animations explanation with examples.

UNMAINTAINED No maintainance is intended. The content is still valid as a reference but it won't contain the latest new stuff Android Transition Frame

Luis G. Valle 13.6k Dec 28, 2022
A simple and customizable Android full-screen image viewer with shared image transition support, "pinch to zoom" and "swipe to dismiss" gestures

Stfalcon ImageViewer A simple and customizable full-screen image viewer with shared image transition support, "pinch to zoom" and "swipe to dismiss" g

Stfalcon LLC 1.9k Jan 5, 2023
Simple tool which help you to implement activity and fragment transition for pre-Lollipop devices.

PreLollipopTransition Simple tool which help you to implement activity and fragment transition for pre-Lollipop devices. Download In your app build.gr

Takahiro Menju 1.3k Nov 28, 2022
Lightweight Android library for cool activity transition animations

Bungee min SDK 16 (Android Jellybean 4.1) written in Java A lightweight, easy-to-use Android library that provides awesome activity transition animati

Dean Spencer 172 Nov 18, 2022
Android Animation Easing Functions. Let's make animation more real!

Android Easing Functions This project is originally from my another project, AndroidViewAnimation, which is an animation collection, to help you make

代码家 2.5k Jan 4, 2023
DuGuang 1k Dec 14, 2022
Android ripple animation helper, easy to create Circular Reveal. | Android水波动画帮助类,轻松实现View show/hide/startActivity()特效。(0.4.6)

CircularAnim English | 中文 首先来看一个UI动效图。 效果图是是Dribbble上看到的,原作品在此。 我所实现的效果如下: Watch on YouTube Compile 最新可用版本 So,你可以如下compile该项目,也可以直接把这个类 CircularAnim 拷

ice 2k Nov 19, 2022
create your custom themes and change them dynamically with ripple animation

Android Animated Theme Manager create your custom themes and change them dynamically with ripple animation Features support java and kotlin projects.

Iman Dolatkia 601 Dec 22, 2022
Android Library to create Lottie animation view dialog easily with a lot of customization

LottieDialog Android Library to create Lottie animation view dialog easily with a lot of customization Why you should use Lottie Dialog You have no li

Amr Hesham 39 Oct 7, 2022
Android Library to create Lottie animation view dialog easily with a lot of customization

Android Library to create Lottie animation view dialog easily with a lot of customization

Amr Hesham 39 Oct 7, 2022
Cute view animation collection.

Android View Animations One day, I saw an iOS library, which is a view shaker, it's very beautiful. I think Android also need one, and should be bette

代码家 12.2k Jan 1, 2023
A beautiful ripple animation for your app

Android Ripple Background A beautiful ripple animation for your app. You can easily change its color, speed of wave, one ripple or multiple ripples. S

Yao Yu 2.2k Dec 31, 2022
A component for flip animation on Android, which is similar to the effect in Flipboard iPhone/Android

android-flip Aphid FlipView is a UI component to accomplish the flipping animation like Flipboard does. A pre-built demo APK file for Android OS 2.2+

Bo 2.8k Dec 21, 2022