An Android library which provides simple Item animations to RecyclerView items

Overview

RecyclerViewItemAnimators Library

Travis master: Build Status

This repo provides:

  • Appearance animations
  • Simple animators for the item views

Screen

Quick start

You can now download it from Sonatype's snapshots repo.

  1. Add the snapshots repo to your build.gradle

    repositories {
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    }
  2. Add build dependency

    dependencies {
        compile 'com.github.gabrielemariotti.recyclerview:recyclerview-animators:0.3.0-SNAPSHOT@aar'
    }

Feature

These animators work with the RecyclerView provided by Google with the support library com.android.support:recyclerview-v7:23.1.1.

Appearance animations: which work when loading on the screen or when scrolling

  • Alpha
  • SlideInLeft
  • SlideInRight
  • SlideInBottom
  • ScaleIn

Simple Animators: cloned from DefaultItemAnimator provided by Google customizing the animations. This part is still in beta.

  • SlideInOutLeftItemAnimator : which applies a slide in/out from/to the left animation
  • SlideInOutRightItemAnimator : which applies a slide in/out from/to the right animation
  • SlideInOutTopItemAnimator : which applies a slide in/out from/to the top animation
  • SlideInOutBottomItemAnimator : which applies a slide in/out from/to the bottom animation
  • ScaleInOutItemAnimator : which applies a scale animation
  • SlideScaleInOutRightItemAnimator : which applies a scale animation with a slide in/out from/to the right animation

Quick example:

Appearance animations:

   mAdapter = new MyAdapter(this);

   AlphaAnimatorAdapter animatorAdapter = new AlphaAnimatorAdapter(mAdapter, mRecyclerView);
   mRecyclerView.setAdapter(animatorAdapter);

Simple Animators:

   mRecyclerView.setItemAnimator(new SlideInOutLeftItemAnimator(mRecyclerView));

NOTE: Feedbacks and patches are welcome!

The sample app uses all features available in the widget.

ChangeLog

Acknowledgements

Credits

Author: Gabriele Mariotti ([email protected])

Follow me on Google+ Follow me on Twitter Follow me on LinkedIn

License

Copyright 2014-2015 Gabriele Mariotti

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Comments
  • Does minSdkVersion have to be L?

    Does minSdkVersion have to be L?

    My project's minSdkVersion is 15 but in your library its L, isn't your lib compatible with older sdks? I'm getting

    Error:Execution failed for task ':doximity:processDebugManifest'.
    > Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be different than version L declared in library /Users/kayvan/Documents/sources/Android-dox-as/doximity/build/intermediates/exploded-aar/com.github.gabrielemariotti.recyclerview/recyclerview-animators/0.1.0-SNAPSHOT/AndroidManifest.xml
    
    enhancement fixed-in-development 
    opened by kayvannj 8
  • Initially loaded items in adapter

    Initially loaded items in adapter

    ItemAnimator works great when clicking Add and Remove buttons in sample project. But can It be done on items which are initially loaded as in this project for listView and gridView. ?

    https://github.com/nhaarman/ListViewAnimations

    enhancement fixed-in-development 
    opened by mohammadkhatri 5
  • Updates?

    Updates?

    Are there any plans to update this now that RecyclerView has been released? Currently you're still requiring min sdk L.

    This project also has been noticed by the community, and is currently the #1 search result on Google for RecyclerView ItemAnimator.

    One more thing, as things are currently, this project doesn't need to be an Android Library, but could just be converted to a jar.

    duplicate fixed-in-development 
    opened by ScottPierce 3
  • Add Support for 23.1 App Compact

    Add Support for 23.1 App Compact

    Let the

     public abstract class BaseItemAnimator extends SimpleItemAnimator 
    

    instead of

    public abstract class BaseItemAnimator extends RecyclerView.ItemAnimator
    
    bug fixed-in-development 
    opened by vsahu1986 2
  • ExpandableTextView expanded state lost during orientation change

    ExpandableTextView expanded state lost during orientation change

    ExnpandableTextView doesn't maintain expanded state changes between orientation/config changes.

    How to reproduce:

    1. Remove android:configChanges from manifest of current Demo.
    2. Run the app.
    3. Expand ExpandableTextView. and
    4. Change orientation of the device.

    ExpandableTextView loses its expanded state.

    opened by abbasshah17 0
  • Gradle not recognizing this library please fix

    Gradle not recognizing this library please fix

    Could not resolve com.github.gabrielemariotti.recyclerview:recyclerview-animators:0.3.0-SNAPSHOT. Required by: project :app > Could not resolve com.github.gabrielemariotti.recyclerview:recyclerview-animators:0.3.0-SNAPSHOT. > Unable to load Maven meta-data from http://jitpack.io/com/github/gabrielemariotti/recyclerview/recyclerview-animators/0.3.0-SNAPSHOT/maven-metadata.xml. > Could not get resource 'http://jitpack.io/com/github/gabrielemariotti/recyclerview/recyclerview-animators/0.3.0-SNAPSHOT/maven-metadata.xml'. > Could not GET 'https://jitpack.io/com/github/gabrielemariotti/recyclerview/recyclerview-animators/0.3.0-SNAPSHOT/maven-metadata.xml'. > Read timed out

    opened by safiyaAkhtar06 0
  • Missing AnimatorCompatHelper.java file

    Missing AnimatorCompatHelper.java file

    private void resetAnimation(RecyclerView.ViewHolder holder) { // TODO: 2019-08-23 missing file // AnimatorCompatHelper.clearInterpolator(holder.itemView); endAnimation(holder); }

    Lost the file ‘AnimatorCompatHelper’, I removed this line and the test works fine.

    opened by zcwfeng 0
  • Suport Recyclerview-v7:27+

    Suport Recyclerview-v7:27+

    Hi, I´m trying to use your lib on Android Studio 3.0.1 with Recyclerview-v7:27.0.1 and I away get "Fail to resolve" on implementation 'com.github.gabrielemariotti.recyclerview:recyclerview-animators:0.3.0-SNAPSHOT@aar'

    A´m I doing something wrong or your lib must be updated?

    Thank you.

    opened by IndiceDev 0
  • ViewAnimation assumes I'm using a Linear Layout Manager

    ViewAnimation assumes I'm using a Linear Layout Manager

    Line #270 and #271 of ViewAnimation.java: int lastVisiblePosition = ((LinearLayoutManager)mRecyclerView.getLayoutManager()).findLastCompletelyVisibleItemPosition(); It tries to cast my layout manager to a linear layout, which is not the case, since I'm using StaggeredGridLayoutManager.

    Am I missing something or the lib does not support the use of another type of Layout Manager?

    opened by bruno1308 0
  • SwingBottomInAnimationAdapter : generic type is missing

    SwingBottomInAnimationAdapter : generic type is missing

    First of all, great work!

    SwingBottomInAnimationAdapter has missing configuration, it should be generic as other adapters.

    So now we have:

    public class SwingBottomInAnimationAdapter extends AnimatorAdapter {
      public SwingBottomInAnimationAdapter(RecyclerView.Adapter<RecyclerView.ViewHolder> adapter, RecyclerView recyclerView) {
            super(adapter, recyclerView);
        }
    ...
    }
    

    and should be :

    public class SwingBottomInAnimationAdapter<T extends RecyclerView.ViewHolder> extends AnimatorAdapter<T> {
    
        public SwingBottomInAnimationAdapter(RecyclerView.Adapter<T> adapter, RecyclerView recyclerView) {
            super(adapter, recyclerView);
        }
    ...
    
    opened by polok 0
Owner
Gabriele Mariotti
Gabriele Mariotti
FragmentTransactionExtended is a library which provide us a set of custom animations between fragments.

FragmentTransactionExtended FragmentTransactionExtended is a library which provide us a set of custom animations between fragments. FragmentTransactio

Antonio Corrales 1.1k Dec 29, 2022
Android Library that lights items for tutorials or walk-throughs etc...

Spotlight Gradle dependencies { implementation 'com.github.takusemba:spotlight:x.x.x' } Usage val spotlight = Spotlight.Builder(this) .setTarg

TakuSemba 3.4k Jan 4, 2023
Trying to play with Jetpack compose low level animations APIs, which are animate*AsState APIs.

ComposeSimpleAnimation Trying to play with Jetpack compose low level animations APIs, which are animate*AsState APIs that I needed in another project.

Mustafa Ibrahim 39 Dec 10, 2022
FadingToolbar is an animation library which fades out your footer view in a ScrollView/RecyclerView and fades in a toolbar title

FadingToolbar is an animation library which fades out your footer view in a ScrollView/RecyclerView and fades in a toolbar title (analogue of the LargeTitle animation in iOS)

Hanna 9 Nov 3, 2022
Introduction your app to the user , Easy to use and set Items as you want

Introduction App This lib helps to introduce the App-by view page based on Kotlin. Features Easy Set up Items: Title, Describe, Background, Buttons Ap

S.M.Zendehbad 0 May 6, 2022
Combine ViewPager and Animations to provide a simple way to create applications' guide pages.

WoWoViewPager WoWoViewPager combines ViewPager and Animations to provide a simple way to create applications' guide pages. When users are dragging WoW

Nightonke 2.7k Dec 30, 2022
Library containing common animations needed for transforming ViewPager scrolling for Android v13+.

ViewPagerTransforms Library containing common animations needed for transforming ViewPager scrolling on Android v13+. This library is a rewrite of the

Ian Thomas 2.5k Dec 29, 2022
Android library to create complex multi-state animations.

MultiStateAnimation Android library to create complex multi-state animations. Overview A class that allows for complex multi-state animations using An

Keepsafe 405 Nov 11, 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
A lightweight android library that allows to you create custom fast forward/rewind animations like on Netflix.

SuperForwardView About A lightweight android library that allows to you create custom fast forward/rewind animations like on Netflix. GIF Design Credi

Ertugrul 77 Dec 9, 2022
💠Metaphor is the library to easily add Material Motion animations

Metaphor Metaphor is the library to easily add Material Motion animations. Who's using Metaphor? ?? Check out who's using Metaphor Include in your pro

Ranbir Singh 132 Dec 25, 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
Library provides an easy way to a add shimmer effect in Android Compose project.

Add a shimmer effect to the layout in Android Compose

Valery 66 Dec 14, 2022
MIPagerTransformer is an android library that provides a seamless image transformation experience.

MIPagerTransformerView -- MIPagerTransformer is an android library that provides a seamless image transformation experience. Overview ?? Shutter ?? Pa

MindInventory 21 Sep 17, 2022
Actions for android animations. Inspired by libgdx scene2d actions.

Android Animations Actions Actions for android animations. Inspired by libgdx scene2d actions. The main goal of this project is making creating of com

dtx12 137 Nov 29, 2022
Render After Effects animations natively on Android and iOS, Web, and React Native

Lottie for Android, iOS, React Native, Web, and Windows Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations expo

Airbnb 33.5k Jan 4, 2023
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
The lib can make the ActivityOptions animations use in Android api3.1+

ActivityOptionsICS 本项目停止维护 =========== f you are thinking on customizing the animation of Activity transition then probably you would look for Activit

Kale 591 Nov 18, 2022