{"id":13396128,"url":"https://github.com/wasabeef/recyclerview-animators","last_synced_at":"2025-12-18T08:32:23.783Z","repository":{"id":24923924,"uuid":"28340997","full_name":"wasabeef/recyclerview-animators","owner":"wasabeef","description":"An Android Animation library which easily add itemanimator to RecyclerView items.","archived":false,"fork":false,"pushed_at":"2023-12-30T20:00:42.000Z","size":67775,"stargazers_count":11539,"open_issues_count":110,"forks_count":1977,"subscribers_count":307,"default_branch":"master","last_synced_at":"2025-04-23T16:05:02.999Z","etag":null,"topics":["android","android-library","animation","java","kotlin","recyclerview"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wasabeef.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"wasabeef","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2014-12-22T14:07:08.000Z","updated_at":"2025-04-18T06:02:54.000Z","dependencies_parsed_at":"2024-05-03T15:36:44.210Z","dependency_job_id":null,"html_url":"https://github.com/wasabeef/recyclerview-animators","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasabeef%2Frecyclerview-animators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasabeef%2Frecyclerview-animators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasabeef%2Frecyclerview-animators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasabeef%2Frecyclerview-animators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wasabeef","download_url":"https://codeload.github.com/wasabeef/recyclerview-animators/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253745462,"owners_count":21957376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-library","animation","java","kotlin","recyclerview"],"created_at":"2024-07-30T18:00:40.903Z","updated_at":"2025-12-18T08:32:18.724Z","avatar_url":"https://github.com/wasabeef.png","language":"Kotlin","funding_links":["https://github.com/sponsors/wasabeef"],"categories":["Index `(light-weight pages)`","Libraries","Kotlin","RecyclerView","Index","Java","Android 应用","Libs","必备开发库"],"sub_categories":["网络服务_其他","\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget","Android 常用库"],"readme":"RecyclerView Animators\n======================\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"art/logo.jpg\" width=\"80%\"\u003e\n\u003c/p\u003e\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-recyclerview--animators-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1327)\n[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/jp.wasabeef/recyclerview-animators/badge.svg)](https://search.maven.org/artifact/jp.wasabeef/recyclerview-animators)\n\nRecyclerView Animators is an Android library that allows developers to easily create RecyclerView with animations.\n\nPlease feel free to use this.\n\n# Features\n\n* Animate addition and removal of [`ItemAnimator`](#itemanimator-1)\n* Appearance animations for items in [`RecyclerView.Adapter`](#recyclerviewadapter)\n\n# Demo\n\n### ItemAnimator\n\u003cimg src=\"art/demo.gif\" width=\"32%\"\u003e \u003cimg src=\"art/demo2.gif\" width=\"32%\"\u003e \u003cimg src=\"art/demo3.gif\" width=\"32%\"\u003e\n\n### Adapters\n\u003cimg src=\"art/demo4.gif\" width=\"32%\"\u003e \u003cimg src=\"art/demo5.gif\" width=\"32%\"\u003e\n\n# How do I use it?\n\n## Setup\n\n#### Gradle\n\nOn your module's `build.gradle` file add this implementation statement to the `dependencies` section:\n\n```groovy\ndependencies {\n  // Kotlin\n  implementation 'jp.wasabeef:recyclerview-animators:4.0.2'\n}\n```\n\nAlso make sure that the `repositories` section includes not only `\"mavenCentral()\"` but also a `maven` section with the `\"google()\"` endpoint. \n\n```\nrepositories {\n  google()\n  mavenCentral()\n  jcenter()\n}\n```\n\n## ItemAnimator\n### Step 1\n\nSet RecyclerView ItemAnimator.\n\n```kotlin\nval recyclerView = findViewById\u003cRecyclerView\u003e(R.id.list)\nrecyclerView.itemAnimator = SlideInLeftAnimator()\n```\n\n```kotlin\nval recyclerView = findViewById\u003cRecyclerView\u003e(R.id.list)\nrecyclerView.itemAnimator = SlideInUpAnimator(OvershootInterpolator(1f))\n```\n\n## Step 2\nPlease use the following  \n`notifyItemChanged(int)`  \n`notifyItemInserted(int)`  \n`notifyItemRemoved(int)`  \n`notifyItemRangeChanged(int, int)`  \n`notifyItemRangeInserted(int, int)`  \n`notifyItemRangeRemoved(int, int)`  \n\n\u003e If you want your animations to work, do not rely on calling `notifyDataSetChanged()`; \n\u003e as it is the RecyclerView's default behavior, animations are not triggered to start inside this method.\n\n```kotlin\nfun remove(position: Int) {\n  dataSet.removeAt(position)\n  notifyItemRemoved(position)\n}\n\nfun add(text: String, position: Int) {\n  dataSet.add(position, text)\n  notifyItemInserted(position)\n}\n```\n\n### Advanced Step 3\n\nYou can change the durations.\n\n```kotlin\nrecyclerView.itemAnimator?.apply {\n  addDuration = 1000\n  removeDuration = 100\n  moveDuration = 1000\n  changeDuration = 100\n}\n```\n\n### Advanced Step 4\n\nChange the interpolator.\n\n```kotlin\nrecyclerView.itemAnimator = SlideInLeftAnimator().apply {\n  setInterpolator(OvershootInterpolator())\n}\n```\n\n### Advanced Step 5\n\nBy implementing AnimateViewHolder, you can override preset animation.\nSo, custom animation can be set depending on view holder.\n\n```kotlin\nclass MyViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), AnimateViewHolder {\n\n  override fun preAnimateRemoveImpl(holder: RecyclerView.ViewHolder) {\n    // do something\n  }\n\n  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder, listener: ViewPropertyAnimatorListener) {\n    itemView.animate().apply {\n      translationY(-itemView.height * 0.3f)\n      alpha(0f)\n      duration = 300\n      setListener(listener)\n    }.start()\n  }\n\n  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {\n    itemView.setTranslationY(-itemView.height * 0.3f)\n    itemView.setAlpha(0f)\n  }\n\n  override fun animateAddImpl(holder: RecyclerView.ViewHolder, listener: ViewPropertyAnimatorListener) {\n    itemView.animate().apply {\n      translationY(0f)\n      alpha(1f)\n      duration = 300\n      setListener(listener)\n    }.start()\n  }\n}\n```\n\n### Animators\n\n#### Cool\n`LandingAnimator`\n\n##### Scale\n`ScaleInAnimator`, `ScaleInTopAnimator`, `ScaleInBottomAnimator`  \n`ScaleInLeftAnimator`, `ScaleInRightAnimator`\n\n\n##### Fade\n`FadeInAnimator`, `FadeInDownAnimator`, `FadeInUpAnimator`  \n`FadeInLeftAnimator`, `FadeInRightAnimator`\n\n##### Flip\n`FlipInTopXAnimator`, `FlipInBottomXAnimator`  \n`FlipInLeftYAnimator`, `FlipInRightYAnimator`\n\n##### Slide\n`SlideInLeftAnimator`, `SlideInRightAnimator`, `OvershootInLeftAnimator`, `OvershootInRightAnimator`  \n`SlideInUpAnimator`, `SlideInDownAnimator`\n\n## RecyclerView.Adapter\n### Step 1\n\nSet RecyclerView ItemAnimator.\n\n```kotlin\nval recyclerView = findViewById\u003cRecyclerView\u003e(R.id.list)\nrecyclerView.adapter = AlphaInAnimationAdapter(MyAdapter())\n```\n\n#### Java\n```java\nRecyclerView recyclerView = findViewById(R.id.list);\nrecyclerView.setAdapter(new AlphaInAnimationAdapter(MyAdapter());\n```\n\n### Advanced Step 2\n\n```kotlin\nrecyclerView.adapter = AlphaInAnimationAdapter(MyAdapter()).apply {\n  // Change the durations.\n  setDuration(1000)\n  // Change the interpolator.\n  setInterpolator(vershootInterpolator())\n  // Disable the first scroll mode.\n  setFirstOnly(false)\n}\n```\n\n#### Java\n```java\nAlphaInAnimationAdapter alphaInAnimationAdapter = new AlphaInAnimationAdapter(new MyAdapter());\nalphaInAnimationAdapter.setDuration(1000);\nalphaInAnimationAdapter.setInterpolator(new OvershootInterpolator());\nalphaInAnimationAdapter.setFirstOnly(false);\n```\n\n### Advanced Step 3\n\nMultiple Animations\n\n```kotlin\nval alphaAdapter = AlphaInAnimationAdapter(MyAdapter())\nrecyclerView.adapter = ScaleInAnimationAdapter(alphaAdapter)\n```\n\n#### Java\n```java\nrecyclerView.setAdapter(new ScaleInAnimationAdapter(alphaInAnimationAdapter));\n```\n\n### Adapters\n\n#### Alpha\n`AlphaInAnimationAdapter`\n\n#### Scale\n`ScaleInAnimationAdapter`\n\n#### Slide\n`SlideInBottomAnimationAdapter`  \n`SlideInRightAnimationAdapter`, `SlideInLeftAnimationAdapter`\n\nApplications using RecyclerView Animators\n---\n\nPlease [ping](mailto:dadadada.chop@gmail.com) me or send a pull request if you would like to be added here.\n\nIcon | Application\n------------ | -------------\n\u003cimg src=\"https://play-lh.googleusercontent.com/6zKH_uQY1bxCwXL4DLo_uoFEOXdShi3BgmN6XRHlaJ-oA1svmq6y1PZkmO50nWQn2Lg=s180-rw\" width=\"48\" height=\"48\" /\u003e | [Ameba Ownd](https://play.google.com/store/apps/details?id=jp.co.cyberagent.madrid)\n\u003cimg src=\"https://lh3.googleusercontent.com/DHtrq5MZQ6aYGbmUSB8WNiOv-Oz9R4TyMCnzzYSjIqT3earlej7eq5DUudnN0bhSOeg=s180-rw\" width=\"48\" height=\"48\" /\u003e | [QuitNow!](https://play.google.com/store/apps/details?id=com.EAGINsoftware.dejaloYa)\n\u003cimg src=\"https://lh3.googleusercontent.com/yFhps2nQ3q7QcpqZhMWYP5_ltMWJekX2eOiE0oWORUsP8CiwWkRtRlxVgiRtCZXUdQ=s180-rw\" width=\"48\" height=\"48\" /\u003e | [AbemaTV](https://play.google.com/store/apps/details?id=tv.abema)\n\u003cimg src=\"https://lh3.googleusercontent.com/S8r0TL8pJ8PGWh_IOkULOHY3MhWvv1LSAOZ3uWJXwpfRq7icS79cPrqH8R5MeXWgAOo=s180-rw\" width=\"48\" height=\"48\" /\u003e | [CL](https://play.google.com/store/apps/details?id=com.cllive)\n\nDeveloped By\n-------\nDaichi Furiya (Wasabeef) - \u003cdadadada.chop@gmail.com\u003e\n\n\u003ca href=\"https://twitter.com/wasabeef_jp\"\u003e\n\u003cimg alt=\"Follow me on Twitter\"\nsrc=\"https://raw.githubusercontent.com/wasabeef/art/master/twitter.png\" width=\"75\"/\u003e\n\u003c/a\u003e\n\nContributions\n-------\n\nAny contributions are welcome!\n\nContributers\n-------\n\n* [craya1982](https://github.com/craya1982)\n\nThanks\n-------\n\n* Inspired by `AndroidViewAnimations` in [daimajia](https://github.com/daimajia).\n\nLicense\n-------\n\n    Copyright 2020 Daichi Furiya / Wasabeef\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasabeef%2Frecyclerview-animators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwasabeef%2Frecyclerview-animators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasabeef%2Frecyclerview-animators/lists"}