Animation in android github
Android Loading Animation
Create Cool Android Loading Animation in a simple way.
This Library will help developer to implement Cool Android Loading Animation in easiest way.
First Screen | Second Screen | Third Screen |
---|---|---|
Add it in your root build.gradle at the end of repositories:
Add the dependency
You may use the following properties in your XML to change your Loading Animation.
/*Loading Animation xml */
- app:barType -> To get animation gif file
- app:text -> To add text below animation
- app:textColor -> To set color of Text
- app:textSize -> To set text Size
- app:enlarge -> To increse size of animation(1 to 10)
- app:boldText -> To make textView Bold
- app:isVisible -> To set text visible(ByDefult invisible)
Источник
Animation in android github
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 better.
So, I started to collect animation effects. and in two days, this project born.
Since Version 2.0, NineOldAndroids has been removed. Thanks Jake Wharton.
For making animations more real, I created another project named Android Easing Functions which is an implementations of easing functions on Android. So, we need to dependent that project.
Just like play Yo-yo.
Flash , Pulse , RubberBand , Shake , Swing , Wobble , Bounce , Tada , StandUp , Wave
Hinge , RollIn , RollOut , Landing , TakingOff , DropOut
BounceIn , BounceInDown , BounceInLeft , BounceInRight , BounceInUp
FadeIn , FadeInUp , FadeInDown , FadeInLeft , FadeInRight
FadeOut , FadeOutDown , FadeOutLeft , FadeOutRight , FadeOutUp
FlipInX , FlipOutX , FlipOutY
RotateIn , RotateInDownLeft , RotateInDownRight , RotateInUpLeft , RotateInUpRight
RotateOut , RotateOutDownLeft , RotateOutDownRight , RotateOutUpLeft , RotateOutUpRight
SlideInLeft , SlideInRight , SlideInUp , SlideInDown
SlideOutLeft , SlideOutRight , SlideOutUp , SlideOutDown
ZoomIn , ZoomInDown , ZoomInLeft , ZoomInRight , ZoomInUp
ZoomOut , ZoomOutDown , ZoomOutLeft , ZoomOutRight , ZoomOutUp
Welcome contribute your amazing animation effect. 😀
YoYo is a toy, with a lot of Techniques.
(2013) A student in mainland China.
Welcome to offer me an internship. If you have any new idea about this project, feel free to contact me.
(2019) Five years later, now I become an investment associate in China.
Welcome to send your business plan to me. Maybe I would have a better understanding on your startup project than others. Trust me.
Источник
Animation in android github
This repository showcases various Android animation libraries.
1. Loading Button
Android button that uses morph animation to transform into circular progressbar. Easy way to make your application more responsive. You can find library repository here. Example of usage here.
Transform view into another view using morph animation. You can also morph between two activities or fragments. This is very nice looking effect that will help your user to better understand changes happening on the screen. TransformationLayout uses MaterialContainerTransform from com.google.android.material:material package to achieve the effect. You can find library repository here. Example of usage here.
3. Spring animation
You might consider using spring animation if you need physics based motion. You can customize spring’s stiffness, damping ratio and its final position to achieve desired effect. You can find documentation here. Example of usage here.
4. Fling animation
You can customize fling animation’s friction and starting velocity. Friction force will be proportional to object’s velocity. You can find documentation here. Example of usage here.
5. Animate layout changes
android:animateLayoutChanges flag is a great and easy way to breathe life into your application. You can use this flag on any ViewGroup. Android framework will then automatically animate layout changes caused by any of the following actions:
- adding view
- removing view
- changing view visibility
- resizing view
You might also customize animation by modifying LayoutTransition object. Have in mind that this API is quite old and limited so you won’t be able to achieve every effect you wish for. You can find documentation here. Example of usage here.
6. Transitions API
Transition framework makes it easy to animate various changes in your application’s UI by simply providing the starting layout and the ending layout. You can describe what kind of animations you would like to use (fade in, fade out, translation) and the transition library will figure out how to animate from the starting layout to the ending layout. You can use transition framework to animate between activities or fragments. You might also animate simple layout changes. We can animate layout changes simply by calling
You might want to create custom transitions if required animation isn’t supported by one of the default transitions. You can do this by providing custom Transition object
Have in mind that Transitions API has some limitations:
- Animations applied to SurfaceView or TextureView might not be displayed correctly.
- Classes extending AdapterView like ListView are incompatible with Transitions framework.
- If you resize widget with text then text will not be animated. It will just pop to the final location.
You can find documentation here. Example of usage here.
7. Transitions API — Scenes
To animate between two layouts with Transitions framework you would use scenes API.
Steps needed to create animation:
- Create two Scene objects — one for the starting layout and second one for ending layout.
- Create Transition object. You customize animations and order.
- Invoke TransitionManager.go().
You can find documentation here. Example of usage here.
ConstraintSet lets you manipulate set of constraints of ConstraintLayout. You can combine manipulating constraint set with Transition API to achieve complex animations easily! You can find documentation here. Example of usage here.
9. Activity transition
You can use Transitions API for activity transitions as well. You can provide enter and exit transitions. You can also specify transition for shared elements between two activities.
Thanks to this, shared elements from one activity will seamlessly transition to second activity. You can find documentation here. Example of usage here.
10. MotionLayout — basics
MotionLayout is a powerful layout that will let you create complex animations without single line of code. It’s fully declarative — you define transitions and interactions in xml. It’s a subclass of ConstraintLayout. It uses underneath property animation framework and Transitions API.
You can find documentation here. Example of usage here.
You can see above debugging overlay. It will show you paths of widgets and will show animation frame rate. You can enable it with app:motionDebug=»SHOW_ALL» .
11. MotionLayout — key frame set
We can control how animation progresses thanks to KeyFrameSet. MotionLayout support various keyframes:
- KeyPosition — specifies a view’s position during the motion sequence.
- KeyAttribute — specifies a view’s attribute value during the motion sequence.
- KeyCycle — adds oscillation to the animation. You can specify waveShape, waveOffset and wavePeriod.
- KeyTimeCycle — a keyframe that allows you to define a cycle driven by time instead of animation progress.
Common keyframes attributes:
- framePosition defines number of the frame (from 0 to 100).
- target defines which view should be modified.
It might be a little bit difficult to design complex animation with keyframes. Luckily you can use cycle editor for that. It’s a tool designed by Google developers that will let you to adjust key cycles in GUI environment. You can find documentation here. Example of usage here.
Demonstration of what can be achieved with MotionLayout in few lines of code. Example of usage here.
13. Vector drawable
Sometimes it’s very useful to animate icons. For example you may need to create progress bar animation consisting of several images or maybe you would like to create animation where one icon morphs into another. I have good news for you. You can delegate creating animation to your designer! This tool will generate drawable xml. You can find documentation here. Example of usage here.
This layout can be used for many things but most often you will use it in combination with AppBarLayout to achieve complex toolbar animations. You may also create your own custom behaviours that will dictate how CoordinatorLayout children interact with each other. You might take a look at ShrinkBehaviour as a reference. It demonstrates how to create behaviour that will shrink you FAB when bottom panel slides in. You can also create more complex behaviours — take a look at the SwipeToDismissBehaviour. This example illustrates usage of ViewDragHelper, powerful class that makes detecting drag gestures much easier. You can find CoordinatorLayout documentation here. Example of usage here.
15. Coordinator layout with BottomSheetBehavior
Another popular use case with CoordinatorLayout is bottom sheet. Bottom sheet is a view that may be dragged by user to reveal its content. Yow will achieve this effect by applying BottomSheetBehavior to a ViewGroup nested in CoordinatorLayout. You can find documentation here. Example of usage here.
About
Examples demonstrating various ways to create animations on Android
Источник
Animation in android github
Android UI Animation Libraries
A curated list of Android libraries, UI components and custom animations developed by Ramotion
Material design expanding content cell inspired by folding paper material
Stay tuned for the latest updates:
Android library Paper Onboarding is a material design UI slider written on Java
Stay tuned for the latest updates:
A simple, elegant UI menu with a circular layout and material design animations
Stay tuned for the latest updates:
Selection widget with an ethereal, full-screen modal popup displaying the available choices
Stay tuned for the latest updates:
Material design UI controller that allows to swipe through cards with pictures and descriptions
Stay tuned for the latest updates:
ExpandingCollection is a material design card peek/pop controller
Stay tuned for the latest updates:
Garland View seamlessly transitions between multiple lists of content
Stay tuned for the latest updates:
A slider widget with a popup bubble displaying the precise value selected
Stay tuned for the latest updates:
Navigation toolbar is a Kotlin slide-modeled UI navigation controller.
Stay tuned for the latest updates:
🗂 Check out other lists of our UI libraries
All Android libraries are released under the MIT license. See LICENSE for details.
If you use the open-source library in your project, please make sure to credit and backlink to www.ramotion.com
📱 Get the Showroom App for iOS to give it a try
Try these UI components and more like this in our iOS app. Contact us if interested.
About
Android UI libraries, components and animations by @Ramotion
Источник