master 6c5c7748e86f cached
73 files
144.1 KB
37.7k tokens
2 symbols
1 requests
Download .txt
Repository: wasabeef/recyclerview-animators
Branch: master
Commit: 6c5c7748e86f
Files: 73
Total size: 144.1 KB

Directory structure:
gitextract__i4k753b/

├── .editorconfig
├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── workflows/
│       └── gradle-build.yml
├── .gitignore
├── .idea/
│   ├── codeStyles/
│   │   ├── Project.xml
│   │   └── codeStyleConfig.xml
│   ├── encodings.xml
│   ├── runConfigurations.xml
│   └── vcs.xml
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── animators/
│   ├── build.gradle
│   └── src/
│       ├── androidTest/
│       │   └── java/
│       │       └── jp/
│       │           └── wasabeef/
│       │               └── recyclerview/
│       │                   └── ApplicationTest.java
│       └── main/
│           ├── AndroidManifest.xml
│           └── java/
│               └── jp/
│                   └── wasabeef/
│                       └── recyclerview/
│                           ├── adapters/
│                           │   ├── AlphaInAnimationAdapter.kt
│                           │   ├── AnimationAdapter.kt
│                           │   ├── ScaleInAnimationAdapter.kt
│                           │   ├── SlideInBottomAnimationAdapter.kt
│                           │   ├── SlideInLeftAnimationAdapter.kt
│                           │   └── SlideInRightAnimationAdapter.kt
│                           ├── animators/
│                           │   ├── BaseItemAnimator.kt
│                           │   ├── FadeInAnimator.kt
│                           │   ├── FadeInDownAnimator.kt
│                           │   ├── FadeInLeftAnimator.kt
│                           │   ├── FadeInRightAnimator.kt
│                           │   ├── FadeInUpAnimator.kt
│                           │   ├── FlipInBottomXAnimator.kt
│                           │   ├── FlipInLeftYAnimator.kt
│                           │   ├── FlipInRightYAnimator.kt
│                           │   ├── FlipInTopXAnimator.kt
│                           │   ├── LandingAnimator.kt
│                           │   ├── OvershootInLeftAnimator.kt
│                           │   ├── OvershootInRightAnimator.kt
│                           │   ├── ScaleInAnimator.kt
│                           │   ├── ScaleInBottomAnimator.kt
│                           │   ├── ScaleInLeftAnimator.kt
│                           │   ├── ScaleInRightAnimator.kt
│                           │   ├── ScaleInTopAnimator.kt
│                           │   ├── SlideInDownAnimator.kt
│                           │   ├── SlideInLeftAnimator.kt
│                           │   ├── SlideInRightAnimator.kt
│                           │   ├── SlideInUpAnimator.kt
│                           │   └── holder/
│                           │       └── AnimateViewHolder.kt
│                           └── internal/
│                               └── ViewHelper.kt
├── build.gradle
├── example/
│   ├── build.gradle
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── jp/
│           │       └── wasabeef/
│           │           └── example/
│           │               └── recyclerview/
│           │                   ├── AdapterSampleActivity.kt
│           │                   ├── AnimatorSampleActivity.kt
│           │                   ├── MainActivity.kt
│           │                   ├── MainAdapter.kt
│           │                   ├── MyAnimationAdapter.kt
│           │                   ├── MyAnimator.kt
│           │                   └── SampleData.kt
│           └── res/
│               ├── layout/
│               │   ├── activity_adapter_sample.xml
│               │   ├── activity_animator_sample.xml
│               │   ├── activity_main.xml
│               │   └── layout_list_item.xml
│               └── values/
│                   ├── dimens.xml
│                   ├── strings.xml
│                   └── styles.xml
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── signingConfigs/
    ├── debug.gradle
    └── debug.keystore

================================================
FILE CONTENTS
================================================

================================================
FILE: .editorconfig
================================================
[*.{kt,kts,java}]
indent_size=2
max_line_length=off
insert_final_newline=true

[*.{kt,kts}]
kotlin_imports_layout=ascii


================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms

github: wasabeef # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']


================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
# Future Task

## What is the motivation?

## What kind of solution can be considered?

## What do you want to discuss?

*Please add relevant labels*

-----

# Bug Reporting

## Steps to Reproduce

## Actual Results (include screenshots)

## Expected Results (include screenshots)

## URL

## OS details

- Device:
- OS:

*Please add relevant labels*


================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
## What does this change?

## What is the value of this and can you measure success?

## Screenshots



================================================
FILE: .github/workflows/gradle-build.yml
================================================
name: "Gradle build"
on: [push, pull_request]

jobs:
  gradle:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Build with Gradle
        run: ./gradlew build

================================================
FILE: .gitignore
================================================
# Mac OS
.DS_store

# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches
.idea/misc.xml
.idea/modules.xml
.idea/navEditor.xml
.idea/markdown*
.idea/compiler.xml
.idea/inspectionProfiles/Project_Default.xml
.idea/jarRepositories.xml
projectFilesBackup/

# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# Google Services (e.g. APIs or Firebase)
google-services.json



================================================
FILE: .idea/codeStyles/Project.xml
================================================
<component name="ProjectCodeStyleConfiguration">
  <code_scheme name="Project" version="173">
    <option name="USE_SAME_INDENTS" value="true" />
    <option name="IGNORE_SAME_INDENTS_FOR_LANGUAGES" value="true" />
    <option name="OTHER_INDENT_OPTIONS">
      <value>
        <option name="INDENT_SIZE" value="2" />
        <option name="CONTINUATION_INDENT_SIZE" value="4" />
        <option name="TAB_SIZE" value="2" />
      </value>
    </option>
    <option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
    <option name="BLOCK_COMMENT_AT_FIRST_COLUMN" value="false" />
    <option name="KEEP_LINE_BREAKS" value="false" />
    <option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
    <option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
    <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
    <option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
    <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
    <option name="ALIGN_MULTILINE_FOR" value="false" />
    <option name="SPACE_WITHIN_ARRAY_INITIALIZER_BRACES" value="true" />
    <option name="SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE" value="true" />
    <option name="CALL_PARAMETERS_WRAP" value="1" />
    <option name="METHOD_PARAMETERS_WRAP" value="1" />
    <option name="RESOURCE_LIST_WRAP" value="1" />
    <option name="EXTENDS_LIST_WRAP" value="1" />
    <option name="THROWS_LIST_WRAP" value="1" />
    <option name="EXTENDS_KEYWORD_WRAP" value="1" />
    <option name="THROWS_KEYWORD_WRAP" value="1" />
    <option name="METHOD_CALL_CHAIN_WRAP" value="5" />
    <option name="BINARY_OPERATION_WRAP" value="5" />
    <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
    <option name="TERNARY_OPERATION_WRAP" value="1" />
    <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
    <option name="FOR_STATEMENT_WRAP" value="1" />
    <option name="ARRAY_INITIALIZER_WRAP" value="1" />
    <option name="ASSIGNMENT_WRAP" value="1" />
    <option name="WRAP_COMMENTS" value="true" />
    <option name="ASSERT_STATEMENT_WRAP" value="1" />
    <option name="IF_BRACE_FORCE" value="1" />
    <option name="DOWHILE_BRACE_FORCE" value="1" />
    <option name="WHILE_BRACE_FORCE" value="1" />
    <option name="METHOD_ANNOTATION_WRAP" value="1" />
    <option name="FIELD_ANNOTATION_WRAP" value="1" />
    <option name="PARAMETER_ANNOTATION_WRAP" value="1" />
    <option name="VARIABLE_ANNOTATION_WRAP" value="1" />
    <option name="ENUM_CONSTANTS_WRAP" value="1" />
    <AndroidXmlCodeStyleSettings>
      <option name="LAYOUT_SETTINGS">
        <value>
          <option name="INSERT_BLANK_LINE_BEFORE_TAG" value="false" />
          <option name="INSERT_LINE_BREAK_AFTER_LAST_ATTRIBUTE" value="true" />
        </value>
      </option>
      <option name="MANIFEST_SETTINGS">
        <value>
          <option name="INSERT_LINE_BREAK_AFTER_LAST_ATTRIBUTE" value="true" />
        </value>
      </option>
      <option name="OTHER_SETTINGS">
        <value>
          <option name="INSERT_LINE_BREAK_AFTER_LAST_ATTRIBUTE" value="true" />
        </value>
      </option>
    </AndroidXmlCodeStyleSettings>
    <JavaCodeStyleSettings>
      <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
      <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
      <option name="IMPORT_LAYOUT_TABLE">
        <value>
          <package name="" withSubpackages="true" static="false" />
          <emptyLine />
          <package name="" withSubpackages="true" static="true" />
        </value>
      </option>
      <option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
      <option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" />
      <option name="JD_P_AT_EMPTY_LINES" value="false" />
      <option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
      <option name="JD_KEEP_EMPTY_PARAMETER" value="false" />
      <option name="JD_KEEP_EMPTY_RETURN" value="false" />
      <option name="JD_PRESERVE_LINE_FEEDS" value="true" />
    </JavaCodeStyleSettings>
    <JetCodeStyleSettings>
      <option name="PACKAGES_TO_USE_STAR_IMPORTS">
        <value>
          <package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
        </value>
      </option>
      <option name="PACKAGES_IMPORT_LAYOUT">
        <value>
          <package name="" alias="false" withSubpackages="true" />
          <package name="java" alias="false" withSubpackages="true" />
          <package name="javax" alias="false" withSubpackages="true" />
          <package name="kotlin" alias="false" withSubpackages="true" />
          <package name="" alias="true" withSubpackages="true" />
        </value>
      </option>
      <option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" />
      <option name="NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS" value="2147483647" />
      <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
    </JetCodeStyleSettings>
    <MarkdownNavigatorCodeStyleSettings>
      <option name="RIGHT_MARGIN" value="72" />
    </MarkdownNavigatorCodeStyleSettings>
    <XML>
      <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
    </XML>
    <ADDITIONAL_INDENT_OPTIONS fileType="php">
      <option name="INDENT_SIZE" value="2" />
      <option name="CONTINUATION_INDENT_SIZE" value="4" />
      <option name="TAB_SIZE" value="2" />
    </ADDITIONAL_INDENT_OPTIONS>
    <ADDITIONAL_INDENT_OPTIONS fileType="scala">
      <option name="INDENT_SIZE" value="2" />
      <option name="CONTINUATION_INDENT_SIZE" value="2" />
      <option name="TAB_SIZE" value="2" />
    </ADDITIONAL_INDENT_OPTIONS>
    <ADDITIONAL_INDENT_OPTIONS fileType="sql">
      <option name="INDENT_SIZE" value="2" />
      <option name="CONTINUATION_INDENT_SIZE" value="4" />
      <option name="TAB_SIZE" value="2" />
    </ADDITIONAL_INDENT_OPTIONS>
    <codeStyleSettings language="Groovy">
      <option name="RIGHT_MARGIN" value="150" />
      <option name="KEEP_LINE_BREAKS" value="false" />
      <option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
      <option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
      <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
      <option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
      <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
      <option name="ALIGN_MULTILINE_FOR" value="false" />
      <option name="CALL_PARAMETERS_WRAP" value="1" />
      <option name="METHOD_PARAMETERS_WRAP" value="1" />
      <option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
      <option name="EXTENDS_LIST_WRAP" value="1" />
      <option name="THROWS_LIST_WRAP" value="1" />
      <option name="EXTENDS_KEYWORD_WRAP" value="1" />
      <option name="THROWS_KEYWORD_WRAP" value="1" />
      <option name="METHOD_CALL_CHAIN_WRAP" value="5" />
      <option name="BINARY_OPERATION_WRAP" value="5" />
      <option name="TERNARY_OPERATION_WRAP" value="1" />
      <option name="FOR_STATEMENT_WRAP" value="1" />
      <option name="ASSIGNMENT_WRAP" value="1" />
      <option name="ASSERT_STATEMENT_WRAP" value="1" />
      <option name="IF_BRACE_FORCE" value="1" />
      <option name="WHILE_BRACE_FORCE" value="1" />
      <option name="METHOD_ANNOTATION_WRAP" value="1" />
      <option name="FIELD_ANNOTATION_WRAP" value="1" />
      <option name="PARAMETER_ANNOTATION_WRAP" value="1" />
      <option name="VARIABLE_ANNOTATION_WRAP" value="1" />
      <indentOptions>
        <option name="INDENT_SIZE" value="2" />
        <option name="CONTINUATION_INDENT_SIZE" value="2" />
        <option name="TAB_SIZE" value="2" />
      </indentOptions>
    </codeStyleSettings>
    <codeStyleSettings language="JAVA">
      <option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
      <option name="BLOCK_COMMENT_AT_FIRST_COLUMN" value="false" />
      <option name="KEEP_LINE_BREAKS" value="false" />
      <option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
      <option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
      <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
      <option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
      <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
      <option name="ALIGN_MULTILINE_FOR" value="false" />
      <option name="SPACE_WITHIN_ARRAY_INITIALIZER_BRACES" value="true" />
      <option name="SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE" value="true" />
      <option name="CALL_PARAMETERS_WRAP" value="1" />
      <option name="METHOD_PARAMETERS_WRAP" value="1" />
      <option name="RESOURCE_LIST_WRAP" value="1" />
      <option name="EXTENDS_LIST_WRAP" value="1" />
      <option name="THROWS_LIST_WRAP" value="1" />
      <option name="EXTENDS_KEYWORD_WRAP" value="1" />
      <option name="THROWS_KEYWORD_WRAP" value="1" />
      <option name="METHOD_CALL_CHAIN_WRAP" value="5" />
      <option name="BINARY_OPERATION_WRAP" value="1" />
      <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
      <option name="TERNARY_OPERATION_WRAP" value="1" />
      <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
      <option name="FOR_STATEMENT_WRAP" value="1" />
      <option name="ARRAY_INITIALIZER_WRAP" value="1" />
      <option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
      <option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
      <option name="ASSIGNMENT_WRAP" value="1" />
      <option name="ASSERT_STATEMENT_WRAP" value="1" />
      <option name="IF_BRACE_FORCE" value="1" />
      <option name="DOWHILE_BRACE_FORCE" value="1" />
      <option name="WHILE_BRACE_FORCE" value="1" />
      <option name="METHOD_ANNOTATION_WRAP" value="1" />
      <option name="FIELD_ANNOTATION_WRAP" value="1" />
      <option name="PARAMETER_ANNOTATION_WRAP" value="1" />
      <option name="VARIABLE_ANNOTATION_WRAP" value="1" />
      <indentOptions>
        <option name="INDENT_SIZE" value="2" />
        <option name="CONTINUATION_INDENT_SIZE" value="2" />
        <option name="TAB_SIZE" value="2" />
      </indentOptions>
    </codeStyleSettings>
    <codeStyleSettings language="XML">
      <indentOptions>
        <option name="INDENT_SIZE" value="2" />
        <option name="CONTINUATION_INDENT_SIZE" value="2" />
        <option name="TAB_SIZE" value="2" />
      </indentOptions>
      <arrangement>
        <rules>
          <section>
            <rule>
              <match>
                <AND>
                  <NAME>xmlns:android</NAME>
                  <XML_ATTRIBUTE />
                  <XML_NAMESPACE>.*</XML_NAMESPACE>
                </AND>
              </match>
            </rule>
          </section>
          <section>
            <rule>
              <match>
                <AND>
                  <NAME>xmlns:.*</NAME>
                  <XML_ATTRIBUTE />
                  <XML_NAMESPACE>.*</XML_NAMESPACE>
                </AND>
              </match>
              <order>BY_NAME</order>
            </rule>
          </section>
          <section>
            <rule>
              <match>
                <AND>
                  <NAME>.*:id</NAME>
                  <XML_ATTRIBUTE />
                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                </AND>
              </match>
            </rule>
          </section>
          <section>
            <rule>
              <match>
                <AND>
                  <NAME>.*:name</NAME>
                  <XML_ATTRIBUTE />
                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                </AND>
              </match>
            </rule>
          </section>
          <section>
            <rule>
              <match>
                <AND>
                  <NAME>name</NAME>
                  <XML_ATTRIBUTE />
                  <XML_NAMESPACE>^$</XML_NAMESPACE>
                </AND>
              </match>
            </rule>
          </section>
          <section>
            <rule>
              <match>
                <AND>
                  <NAME>style</NAME>
                  <XML_ATTRIBUTE />
                  <XML_NAMESPACE>^$</XML_NAMESPACE>
                </AND>
              </match>
            </rule>
          </section>
          <section>
            <rule>
              <match>
                <AND>
                  <NAME>.*</NAME>
                  <XML_ATTRIBUTE />
                  <XML_NAMESPACE>^$</XML_NAMESPACE>
                </AND>
              </match>
              <order>BY_NAME</order>
            </rule>
          </section>
          <section>
            <rule>
              <match>
                <AND>
                  <NAME>.*:orientation</NAME>
                  <XML_ATTRIBUTE />
                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                </AND>
              </match>
            </rule>
          </section>
          <section>
            <rule>
              <match>
                <AND>
                  <NAME>.*:layout_width</NAME>
                  <XML_ATTRIBUTE />
                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                </AND>
              </match>
            </rule>
          </section>
          <section>
            <rule>
              <match>
                <AND>
                  <NAME>.*:layout_height</NAME>
                  <XML_ATTRIBUTE />
                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                </AND>
              </match>
            </rule>
          </section>
          <section>
            <rule>
              <match>
                <AND>
                  <NAME>.*:layout_weight</NAME>
                  <XML_ATTRIBUTE />
                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                </AND>
              </match>
            </rule>
          </section>
          <section>
            <rule>
              <match>
                <AND>
                  <NAME>.*:layout_.*</NAME>
                  <XML_ATTRIBUTE />
                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                </AND>
              </match>
              <order>BY_NAME</order>
            </rule>
          </section>
          <section>
            <rule>
              <match>
                <AND>
                  <NAME>.*:width</NAME>
                  <XML_ATTRIBUTE />
                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                </AND>
              </match>
              <order>BY_NAME</order>
            </rule>
          </section>
          <section>
            <rule>
              <match>
                <AND>
                  <NAME>.*:height</NAME>
                  <XML_ATTRIBUTE />
                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                </AND>
              </match>
              <order>BY_NAME</order>
            </rule>
          </section>
          <section>
            <rule>
              <match>
                <AND>
                  <NAME>.*</NAME>
                  <XML_ATTRIBUTE />
                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                </AND>
              </match>
              <order>BY_NAME</order>
            </rule>
          </section>
          <section>
            <rule>
              <match>
                <AND>
                  <NAME>.*</NAME>
                  <XML_ATTRIBUTE />
                  <XML_NAMESPACE>.*</XML_NAMESPACE>
                </AND>
              </match>
              <order>BY_NAME</order>
            </rule>
          </section>
        </rules>
      </arrangement>
    </codeStyleSettings>
    <codeStyleSettings language="kotlin">
      <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
      <option name="ENUM_CONSTANTS_WRAP" value="2" />
      <indentOptions>
        <option name="INDENT_SIZE" value="2" />
        <option name="CONTINUATION_INDENT_SIZE" value="2" />
        <option name="TAB_SIZE" value="2" />
      </indentOptions>
    </codeStyleSettings>
  </code_scheme>
</component>

================================================
FILE: .idea/codeStyles/codeStyleConfig.xml
================================================
<component name="ProjectCodeStyleConfiguration">
    <state>
        <option name="USE_PER_PROJECT_SETTINGS" value="true" />
        <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
    </state>
</component>

================================================
FILE: .idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>

================================================
FILE: .idea/runConfigurations.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="RunConfigurationProducerService">
    <option name="ignoredProducers">
      <set>
        <option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
      </set>
    </option>
  </component>
</project>

================================================
FILE: .idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="VcsDirectoryMappings">
    <mapping directory="" vcs="Git" />
  </component>
</project>

================================================
FILE: CHANGELOG.md
================================================
Change Log
==========

Version 4.0.0 *(2020-08-27)*
----------------------------

Update:
- Convert from all Java codes to Kotlin 1.3.72
- The minSdkVersion from 14 to 21
- The targetSdkVersion from 28 to 30
- The compileSdkVersion from 28 to 30
- Update project settings
  - Disable Jetifier
  - Add CodeStyle settings

Version 3.0.0 *(2018-11-15)*
----------------------------

Update:
- Migrate to AndroidX
- Remove novoda-bintray-plugin
- Fix a buf [#161](https://github.com/wasabeef/recyclerview-animators/pull/161)

Version 2.3.0 *(2018-02-07)*
----------------------------

Update:  
- Compile & Target SDK Version 25 -> 27  
- Build Tools 26.0.1 -> 27.0.3  
- Support Library 25.3.1 -> 27.0.2  

Version 2.2.7 *(2017-06-29)*
----------------------------

Update:
- Support Library 25.3.0 -> 25.4.0

Version 2.2.6 *(2017-03-17)*
----------------------------

Feature:
- [Changed Interpolator to DecelerateInterpolator #125](https://github.com/wasabeef/recyclerview-animators/pull/125)

Update:
- Build Tools 25 -> 25.0.2
- Support Library 24.2.0 -> 25.3.0

Bugfix:
- [Fix animations not fully canceled on endAnimations()  #86](https://github.com/wasabeef/recyclerview-animators/pull/86)


Version 2.2.5 *(2016-12-02)*
----------------------------

Update:
- Build Tools 24.0.2 -> 25
- Support Library 23.4.0 -> 24.2.0


Version 2.2.4 *(2016-08-03)*
----------------------------

Update:  
- Build Tools 23.0.1 -> 24.0.2  
- Support Library 23.0.1 -> 23.4.0  


Version 2.2.3 *(2016-04-19)*
----------------------------

Bug fix:  
 [Dispatch onViewRecycled event to wrapped adapter #80](https://github.com/wasabeef/recyclerview-animators/pull/80)  
 [Fix setStartDelay() is not reset by clear() #82](https://github.com/wasabeef/recyclerview-animators/pull/82)  
 
Update:  
 Support library 23.2.1

Version 2.2.2 *(2016-04-05)*
----------------------------

Bug fix

Version 2.2.1 *(2016-02-28)*
----------------------------

Bug fix: firstOnly

Version 2.2.0 *(2016-01-29)*
----------------------------

Bug fix: [issue #64](https://github.com/wasabeef/recyclerview-animators/issues/64) by [@emartynov](https://github.com/wasabeef/recyclerview-animators/issues/64)
Feature: [Motion Delay](https://github.com/wasabeef/recyclerview-animators/pull/66) by [@aphexcx](https://github.com/aphexcx)

Version 2.1.0 *(2015-11-25)*
----------------------------

Move the adapters of the package.  
Added BaseItemAnimator#setInterpolator.  

Version 2.0.2 *(2015-11-24)*
----------------------------

Added AnimationAdapter#getIemId  
 Fixed the getItemId() to return the nested adapter item id  

Version 2.0.1 *(2015-11-10)*
----------------------------

Bug fix registerAdapterDataObserver, unregisterAdapterDataObserver

Version 2.0.0 *(2015-10-16)*
----------------------------

Support RecyclerView 23.1.0+

**Use 1.3.0 If you are using a 23.0.1 or below.**

Version 1.3.0 *(2015-09-11)*
----------------------------

Added in ability to pass in interpolators to the four ItemAnimators.
Thanks to [@craya1982](https://github.com/craya1982)

Version 1.2.3 *(2015-09-07)*
----------------------------

Update support library.

Version 1.2.2 *(2015-08-19)*
----------------------------

Add tension in OvershootAnimators.

Version 1.2.1 *(2015-07-07)*
----------------------------

Update AnimationAdapter to allow grabbing the wrappedAdapter.

Version 1.2.0 *(2015-04-15)*
----------------------------

Support Multiple animators for ViewHolders.

Version 1.1.3 *(2015-04-08)*
----------------------------

Support Interpolator in AnimationAdapter.

Version 1.1.2 *(2015-03-23)*
----------------------------

Supports multiple viewTypes.

Version 1.1.1 *(2015-03-17)*
----------------------------

Improved reliability and speed.

Version 1.1.0 *(2015-01-21)*
----------------------------

add RecyclerView.Adapter support.


Version 1.0.3 *(2015-01-21)*
----------------------------

fix setting of pom.xml

Version 1.0.2 *(2015-01-20)*
----------------------------

fix setting of pom.xml

Version 1.0.1 *(2015-01-10)*
----------------------------

Attach a jar for non-Gradle Android users.

Version 1.0.0 *(2015-01-05)*
----------------------------

Initial release.


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
 advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
 address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
 professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at dadadada.chop@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq


================================================
FILE: LICENSE
================================================
Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "{}"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright {yyyy} {name of copyright owner}

   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.



================================================
FILE: README.md
================================================
RecyclerView Animators
======================
<p align="center">
  <img src="art/logo.jpg" width="80%">
</p>

[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-recyclerview--animators-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1327)
[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/jp.wasabeef/recyclerview-animators/badge.svg)](https://search.maven.org/artifact/jp.wasabeef/recyclerview-animators)

RecyclerView Animators is an Android library that allows developers to easily create RecyclerView with animations.

Please feel free to use this.

# Features

* Animate addition and removal of [`ItemAnimator`](#itemanimator-1)
* Appearance animations for items in [`RecyclerView.Adapter`](#recyclerviewadapter)

# Demo

### ItemAnimator
<img src="art/demo.gif" width="32%"> <img src="art/demo2.gif" width="32%"> <img src="art/demo3.gif" width="32%">

### Adapters
<img src="art/demo4.gif" width="32%"> <img src="art/demo5.gif" width="32%">

# How do I use it?

## Setup

#### Gradle

On your module's `build.gradle` file add this implementation statement to the `dependencies` section:

```groovy
dependencies {
  // Kotlin
  implementation 'jp.wasabeef:recyclerview-animators:4.0.2'
}
```

Also make sure that the `repositories` section includes not only `"mavenCentral()"` but also a `maven` section with the `"google()"` endpoint. 

```
repositories {
  google()
  mavenCentral()
  jcenter()
}
```

## ItemAnimator
### Step 1

Set RecyclerView ItemAnimator.

```kotlin
val recyclerView = findViewById<RecyclerView>(R.id.list)
recyclerView.itemAnimator = SlideInLeftAnimator()
```

```kotlin
val recyclerView = findViewById<RecyclerView>(R.id.list)
recyclerView.itemAnimator = SlideInUpAnimator(OvershootInterpolator(1f))
```

## Step 2
Please use the following  
`notifyItemChanged(int)`  
`notifyItemInserted(int)`  
`notifyItemRemoved(int)`  
`notifyItemRangeChanged(int, int)`  
`notifyItemRangeInserted(int, int)`  
`notifyItemRangeRemoved(int, int)`  

> If you want your animations to work, do not rely on calling `notifyDataSetChanged()`; 
> as it is the RecyclerView's default behavior, animations are not triggered to start inside this method.

```kotlin
fun remove(position: Int) {
  dataSet.removeAt(position)
  notifyItemRemoved(position)
}

fun add(text: String, position: Int) {
  dataSet.add(position, text)
  notifyItemInserted(position)
}
```

### Advanced Step 3

You can change the durations.

```kotlin
recyclerView.itemAnimator?.apply {
  addDuration = 1000
  removeDuration = 100
  moveDuration = 1000
  changeDuration = 100
}
```

### Advanced Step 4

Change the interpolator.

```kotlin
recyclerView.itemAnimator = SlideInLeftAnimator().apply {
  setInterpolator(OvershootInterpolator())
}
```

### Advanced Step 5

By implementing AnimateViewHolder, you can override preset animation.
So, custom animation can be set depending on view holder.

```kotlin
class MyViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), AnimateViewHolder {

  override fun preAnimateRemoveImpl(holder: RecyclerView.ViewHolder) {
    // do something
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder, listener: ViewPropertyAnimatorListener) {
    itemView.animate().apply {
      translationY(-itemView.height * 0.3f)
      alpha(0f)
      duration = 300
      setListener(listener)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    itemView.setTranslationY(-itemView.height * 0.3f)
    itemView.setAlpha(0f)
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder, listener: ViewPropertyAnimatorListener) {
    itemView.animate().apply {
      translationY(0f)
      alpha(1f)
      duration = 300
      setListener(listener)
    }.start()
  }
}
```

### Animators

#### Cool
`LandingAnimator`

##### Scale
`ScaleInAnimator`, `ScaleInTopAnimator`, `ScaleInBottomAnimator`  
`ScaleInLeftAnimator`, `ScaleInRightAnimator`


##### Fade
`FadeInAnimator`, `FadeInDownAnimator`, `FadeInUpAnimator`  
`FadeInLeftAnimator`, `FadeInRightAnimator`

##### Flip
`FlipInTopXAnimator`, `FlipInBottomXAnimator`  
`FlipInLeftYAnimator`, `FlipInRightYAnimator`

##### Slide
`SlideInLeftAnimator`, `SlideInRightAnimator`, `OvershootInLeftAnimator`, `OvershootInRightAnimator`  
`SlideInUpAnimator`, `SlideInDownAnimator`

## RecyclerView.Adapter
### Step 1

Set RecyclerView ItemAnimator.

```kotlin
val recyclerView = findViewById<RecyclerView>(R.id.list)
recyclerView.adapter = AlphaInAnimationAdapter(MyAdapter())
```

#### Java
```java
RecyclerView recyclerView = findViewById(R.id.list);
recyclerView.setAdapter(new AlphaInAnimationAdapter(MyAdapter());
```

### Advanced Step 2

```kotlin
recyclerView.adapter = AlphaInAnimationAdapter(MyAdapter()).apply {
  // Change the durations.
  setDuration(1000)
  // Change the interpolator.
  setInterpolator(vershootInterpolator())
  // Disable the first scroll mode.
  setFirstOnly(false)
}
```

#### Java
```java
AlphaInAnimationAdapter alphaInAnimationAdapter = new AlphaInAnimationAdapter(new MyAdapter());
alphaInAnimationAdapter.setDuration(1000);
alphaInAnimationAdapter.setInterpolator(new OvershootInterpolator());
alphaInAnimationAdapter.setFirstOnly(false);
```

### Advanced Step 3

Multiple Animations

```kotlin
val alphaAdapter = AlphaInAnimationAdapter(MyAdapter())
recyclerView.adapter = ScaleInAnimationAdapter(alphaAdapter)
```

#### Java
```java
recyclerView.setAdapter(new ScaleInAnimationAdapter(alphaInAnimationAdapter));
```

### Adapters

#### Alpha
`AlphaInAnimationAdapter`

#### Scale
`ScaleInAnimationAdapter`

#### Slide
`SlideInBottomAnimationAdapter`  
`SlideInRightAnimationAdapter`, `SlideInLeftAnimationAdapter`

Applications using RecyclerView Animators
---

Please [ping](mailto:dadadada.chop@gmail.com) me or send a pull request if you would like to be added here.

Icon | Application
------------ | -------------
<img src="https://play-lh.googleusercontent.com/6zKH_uQY1bxCwXL4DLo_uoFEOXdShi3BgmN6XRHlaJ-oA1svmq6y1PZkmO50nWQn2Lg=s180-rw" width="48" height="48" /> | [Ameba Ownd](https://play.google.com/store/apps/details?id=jp.co.cyberagent.madrid)
<img src="https://lh3.googleusercontent.com/DHtrq5MZQ6aYGbmUSB8WNiOv-Oz9R4TyMCnzzYSjIqT3earlej7eq5DUudnN0bhSOeg=s180-rw" width="48" height="48" /> | [QuitNow!](https://play.google.com/store/apps/details?id=com.EAGINsoftware.dejaloYa)
<img src="https://lh3.googleusercontent.com/yFhps2nQ3q7QcpqZhMWYP5_ltMWJekX2eOiE0oWORUsP8CiwWkRtRlxVgiRtCZXUdQ=s180-rw" width="48" height="48" /> | [AbemaTV](https://play.google.com/store/apps/details?id=tv.abema)
<img src="https://lh3.googleusercontent.com/S8r0TL8pJ8PGWh_IOkULOHY3MhWvv1LSAOZ3uWJXwpfRq7icS79cPrqH8R5MeXWgAOo=s180-rw" width="48" height="48" /> | [CL](https://play.google.com/store/apps/details?id=com.cllive)

Developed By
-------
Daichi Furiya (Wasabeef) - <dadadada.chop@gmail.com>

<a href="https://twitter.com/wasabeef_jp">
<img alt="Follow me on Twitter"
src="https://raw.githubusercontent.com/wasabeef/art/master/twitter.png" width="75"/>
</a>

Contributions
-------

Any contributions are welcome!

Contributers
-------

* [craya1982](https://github.com/craya1982)

Thanks
-------

* Inspired by `AndroidViewAnimations` in [daimajia](https://github.com/daimajia).

License
-------

    Copyright 2020 Daichi Furiya / Wasabeef

    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.


================================================
FILE: animators/build.gradle
================================================
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
  compileSdkVersion COMPILE_SDK_VERSION as int

  defaultConfig {
    minSdkVersion MIN_SDK_VERSION as int
    targetSdkVersion TARGET_SDK_VERSION as int
  }
}

dependencies {
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  implementation "androidx.recyclerview:recyclerview:1.1.0"
}

ext {
  bintrayRepo = 'maven'
  bintrayName = 'recyclerview-animators'
  bintrayUserOrg = 'wasabeef'
  publishedGroupId = 'jp.wasabeef'
  libraryName = 'recyclerview-animators'
  artifact = 'recyclerview-animators'
  libraryDescription = 'Which provides simple Item animations to RecyclerView items'
  siteUrl = 'https://github.com/wasabeef/recyclerview-animators'
  gitUrl = 'https://github.com/wasabeef/recyclerview-animators.git'
  issueUrl = 'https://github.com/wasabeef/recyclerview-animators/issues'
  libraryVersion = VERSION_NAME
  developerId = 'wasabeef'
  developerName = 'Wasabeef'
  developerEmail = 'dadadada.chop@gmail.com'
  licenseName = 'The Apache Software License, Version 2.0'
  licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
  allLicenses = ["Apache-2.0"]
}

// TODO: Close JCenter on May 1st https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
// apply from: 'https://gist.githubusercontent.com/wasabeef/cf14805bee509baf7461974582f17d26/raw/bintray-v1.gradle'
// apply from: 'https://gist.githubusercontent.com/wasabeef/cf14805bee509baf7461974582f17d26/raw/install-v1.gradle'

apply from: 'https://gist.githubusercontent.com/wasabeef/2f2ae8d97b429e7d967128125dc47854/raw/maven-central-v1.gradle'

================================================
FILE: animators/src/androidTest/java/jp/wasabeef/recyclerview/ApplicationTest.java
================================================
package jp.wasabeef.recyclerview;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
 * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
 */
public class ApplicationTest extends ApplicationTestCase<Application> {

  public ApplicationTest() {
    super(Application.class);
  }
}

================================================
FILE: animators/src/main/AndroidManifest.xml
================================================
<manifest package="jp.wasabeef.recyclerview" />


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/adapters/AlphaInAnimationAdapter.kt
================================================
package jp.wasabeef.recyclerview.adapters

import android.animation.Animator
import android.animation.ObjectAnimator
import android.view.View
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class AlphaInAnimationAdapter @JvmOverloads constructor(
  adapter: RecyclerView.Adapter<out RecyclerView.ViewHolder>,
  private val from: Float = DEFAULT_ALPHA_FROM
) : AnimationAdapter(adapter) {

  override fun getAnimators(view: View): Array<Animator> =
    arrayOf(ObjectAnimator.ofFloat(view, "alpha", from, 1f))

  companion object {
    private const val DEFAULT_ALPHA_FROM = 0f
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/adapters/AnimationAdapter.kt
================================================
package jp.wasabeef.recyclerview.adapters

import android.animation.Animator
import android.view.View
import android.view.ViewGroup
import android.view.animation.Interpolator
import android.view.animation.LinearInterpolator
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView.AdapterDataObserver
import jp.wasabeef.recyclerview.internal.ViewHelper.clear

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
abstract class AnimationAdapter(wrapped: RecyclerView.Adapter<out RecyclerView.ViewHolder>) :
  RecyclerView.Adapter<RecyclerView.ViewHolder>() {

  private var duration = 300
  private var interpolator: Interpolator = LinearInterpolator()
  private var lastPosition = -1
  private var isFirstOnly = true

  protected var adapter: RecyclerView.Adapter<RecyclerView.ViewHolder>

  init {
    @Suppress("UNCHECKED_CAST")
    this.adapter = wrapped as RecyclerView.Adapter<RecyclerView.ViewHolder>
    super.setHasStableIds(this.adapter.hasStableIds())
  }

  override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
    return adapter.onCreateViewHolder(parent, viewType)
  }

  override fun registerAdapterDataObserver(observer: AdapterDataObserver) {
    super.registerAdapterDataObserver(observer)
    adapter.registerAdapterDataObserver(observer)
  }

  override fun unregisterAdapterDataObserver(observer: AdapterDataObserver) {
    super.unregisterAdapterDataObserver(observer)
    adapter.unregisterAdapterDataObserver(observer)
  }

  override fun onAttachedToRecyclerView(recyclerView: RecyclerView) {
    super.onAttachedToRecyclerView(recyclerView)
    adapter.onAttachedToRecyclerView(recyclerView)
  }

  override fun onDetachedFromRecyclerView(recyclerView: RecyclerView) {
    super.onDetachedFromRecyclerView(recyclerView)
    adapter.onDetachedFromRecyclerView(recyclerView)
  }

  override fun onViewAttachedToWindow(holder: RecyclerView.ViewHolder) {
    super.onViewAttachedToWindow(holder)
    adapter.onViewAttachedToWindow(holder)
  }

  override fun onViewDetachedFromWindow(holder: RecyclerView.ViewHolder) {
    super.onViewDetachedFromWindow(holder)
    adapter.onViewDetachedFromWindow(holder)
  }

  override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
    adapter.onBindViewHolder(holder, position)
    val adapterPosition = holder.adapterPosition
    if (!isFirstOnly || adapterPosition > lastPosition) {
      for (anim in getAnimators(holder.itemView)) {
        anim.setDuration(duration.toLong()).start()
        anim.interpolator = interpolator
      }
      lastPosition = adapterPosition
    } else {
      clear(holder.itemView)
    }
  }

  override fun onViewRecycled(holder: RecyclerView.ViewHolder) {
    adapter.onViewRecycled(holder)
    super.onViewRecycled(holder)
  }

  override fun getItemCount(): Int {
    return adapter.itemCount
  }

  fun setDuration(duration: Int) {
    this.duration = duration
  }

  fun setInterpolator(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  fun setStartPosition(start: Int) {
    lastPosition = start
  }

  protected abstract fun getAnimators(view: View): Array<Animator>
  fun setFirstOnly(firstOnly: Boolean) {
    isFirstOnly = firstOnly
  }

  override fun getItemViewType(position: Int): Int {
    return adapter.getItemViewType(position)
  }

  val wrappedAdapter: RecyclerView.Adapter<RecyclerView.ViewHolder>
    get() = adapter

  override fun setHasStableIds(hasStableIds: Boolean) {
    super.setHasStableIds(hasStableIds)
    adapter.setHasStableIds(hasStableIds)
  }

  override fun getItemId(position: Int): Long {
    return adapter.getItemId(position)
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/adapters/ScaleInAnimationAdapter.kt
================================================
package jp.wasabeef.recyclerview.adapters

import android.animation.Animator
import android.animation.ObjectAnimator
import android.view.View
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class ScaleInAnimationAdapter @JvmOverloads constructor(
  adapter: RecyclerView.Adapter<out RecyclerView.ViewHolder>,
  private val from: Float = DEFAULT_SCALE_FROM
) : AnimationAdapter(adapter) {

  override fun getAnimators(view: View): Array<Animator> {
    val scaleX = ObjectAnimator.ofFloat(view, "scaleX", from, 1f)
    val scaleY = ObjectAnimator.ofFloat(view, "scaleY", from, 1f)
    return arrayOf(scaleX, scaleY)
  }

  companion object {
    private const val DEFAULT_SCALE_FROM = .5f
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/adapters/SlideInBottomAnimationAdapter.kt
================================================
package jp.wasabeef.recyclerview.adapters

import android.animation.Animator
import android.animation.ObjectAnimator
import android.view.View
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class SlideInBottomAnimationAdapter(
  adapter: RecyclerView.Adapter<out RecyclerView.ViewHolder>
) : AnimationAdapter(adapter) {

  override fun getAnimators(view: View): Array<Animator> = arrayOf(
    ObjectAnimator.ofFloat(view, "translationY", view.measuredHeight.toFloat(), 0f)
  )
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/adapters/SlideInLeftAnimationAdapter.kt
================================================
package jp.wasabeef.recyclerview.adapters

import android.animation.Animator
import android.animation.ObjectAnimator
import android.view.View
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class SlideInLeftAnimationAdapter(
  adapter: RecyclerView.Adapter<out RecyclerView.ViewHolder>
) : AnimationAdapter(adapter) {

  override fun getAnimators(view: View): Array<Animator> = arrayOf(
    ObjectAnimator.ofFloat(view, "translationX", -view.rootView.width.toFloat(), 0f)
  )
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/adapters/SlideInRightAnimationAdapter.kt
================================================
package jp.wasabeef.recyclerview.adapters

import android.animation.Animator
import android.animation.ObjectAnimator
import android.view.View
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class SlideInRightAnimationAdapter(
  adapter: RecyclerView.Adapter<out RecyclerView.ViewHolder>
) : AnimationAdapter(adapter) {

  override fun getAnimators(view: View): Array<Animator> = arrayOf(
    ObjectAnimator.ofFloat(view, "translationX", view.rootView.width.toFloat(), 0f)
  )
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/BaseItemAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.animation.Animator
import android.view.animation.DecelerateInterpolator
import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.SimpleItemAnimator
import jp.wasabeef.recyclerview.animators.holder.AnimateViewHolder
import jp.wasabeef.recyclerview.internal.ViewHelper.clear
import java.util.ArrayList
import kotlin.math.abs

/*
* Copyright (C) 2021 Daichi Furiya / Wasabeef
*
* 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.
*
*/
abstract class BaseItemAnimator : SimpleItemAnimator() {

  private val pendingRemovals = ArrayList<RecyclerView.ViewHolder>()
  private val pendingAdditions = ArrayList<RecyclerView.ViewHolder>()
  private val pendingMoves = ArrayList<MoveInfo>()
  private val pendingChanges = ArrayList<ChangeInfo>()
  private val additionsList = ArrayList<ArrayList<RecyclerView.ViewHolder>>()
  private val movesList = ArrayList<ArrayList<MoveInfo>>()
  private val changesList = ArrayList<ArrayList<ChangeInfo>>()
  protected var addAnimations = ArrayList<RecyclerView.ViewHolder>()
  private val moveAnimations = ArrayList<RecyclerView.ViewHolder>()
  protected var removeAnimations = ArrayList<RecyclerView.ViewHolder>()
  private val changeAnimations = ArrayList<RecyclerView.ViewHolder>()
  protected var interpolator: Interpolator = DecelerateInterpolator()

  companion object {
    private const val DEBUG = false
  }

  init {
    supportsChangeAnimations = false
  }

  private class MoveInfo(
    var holder: RecyclerView.ViewHolder,
    var fromX: Int,
    var fromY: Int,
    var toX: Int,
    var toY: Int
  )

  private class ChangeInfo private constructor(
    oldHolder: RecyclerView.ViewHolder,
    newHolder: RecyclerView.ViewHolder
  ) {
    var oldHolder: RecyclerView.ViewHolder? = oldHolder
    var newHolder: RecyclerView.ViewHolder? = newHolder
    var fromX = 0
    var fromY = 0
    var toX = 0
    var toY = 0

    constructor(
      oldHolder: RecyclerView.ViewHolder,
      newHolder: RecyclerView.ViewHolder,
      fromX: Int,
      fromY: Int,
      toX: Int,
      toY: Int
    ) : this(oldHolder, newHolder) {
      this.fromX = fromX
      this.fromY = fromY
      this.toX = toX
      this.toY = toY
    }

    override fun toString(): String {
      return ("ChangeInfo{" + "oldHolder=" + oldHolder + ", newHolder=" + newHolder + ", fromX="
        + fromX + ", fromY=" + fromY + ", toX=" + toX + ", toY=" + toY + '}')
    }
  }

  override fun runPendingAnimations() {
    val removalsPending = pendingRemovals.isNotEmpty()
    val movesPending = pendingMoves.isNotEmpty()
    val changesPending = pendingChanges.isNotEmpty()
    val additionsPending = pendingAdditions.isNotEmpty()
    if (!removalsPending && !movesPending && !additionsPending && !changesPending) {
      // nothing to animate
      return
    }
    // First, remove stuff
    for (holder in pendingRemovals) {
      doAnimateRemove(holder)
    }
    pendingRemovals.clear()
    // Next, move stuff
    if (movesPending) {
      val moves = ArrayList(pendingMoves)
      movesList.add(moves)
      pendingMoves.clear()
      val mover = Runnable {
        val removed = movesList.remove(moves)
        if (!removed) {
          // already canceled
          return@Runnable
        }
        for (moveInfo in moves) {
          animateMoveImpl(
            moveInfo.holder, moveInfo.fromX, moveInfo.fromY, moveInfo.toX,
            moveInfo.toY
          )
        }
        moves.clear()
      }
      if (removalsPending) {
        val view = moves[0].holder.itemView
        view.postOnAnimationDelayed(mover, removeDuration)
      } else {
        mover.run()
      }
    }
    // Next, change stuff, to run in parallel with move animations
    if (changesPending) {
      val changes = ArrayList(pendingChanges)
      changesList.add(changes)
      pendingChanges.clear()
      val changer = Runnable {
        val removed = changesList.remove(changes)
        if (!removed) {
          // already canceled
          return@Runnable
        }
        for (change in changes) {
          animateChangeImpl(change)
        }
        changes.clear()
      }
      if (removalsPending) {
        val holder = changes[0].oldHolder
        holder!!.itemView.postOnAnimationDelayed(changer, removeDuration)
      } else {
        changer.run()
      }
    }
    // Next, add stuff
    if (additionsPending) {
      val additions = ArrayList(pendingAdditions)
      additionsList.add(additions)
      pendingAdditions.clear()
      val adder = Runnable {
        val removed = additionsList.remove(additions)
        if (!removed) {
          // already canceled
          return@Runnable
        }
        for (holder in additions) {
          doAnimateAdd(holder)
        }
        additions.clear()
      }
      if (removalsPending || movesPending || changesPending) {
        val removeDuration = if (removalsPending) removeDuration else 0
        val moveDuration = if (movesPending) moveDuration else 0
        val changeDuration = if (changesPending) changeDuration else 0
        val totalDelay = removeDuration + moveDuration.coerceAtLeast(changeDuration)
        val view = additions[0].itemView
        view.postOnAnimationDelayed(adder, totalDelay)
      } else {
        adder.run()
      }
    }
  }

  protected open fun preAnimateRemoveImpl(holder: RecyclerView.ViewHolder) {}

  protected open fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {}

  protected abstract fun animateRemoveImpl(holder: RecyclerView.ViewHolder)

  protected abstract fun animateAddImpl(holder: RecyclerView.ViewHolder)

  private fun preAnimateRemove(holder: RecyclerView.ViewHolder) {
    clear(holder.itemView)
    if (holder is AnimateViewHolder) {
      holder.preAnimateRemoveImpl(holder)
    } else {
      preAnimateRemoveImpl(holder)
    }
  }

  private fun preAnimateAdd(holder: RecyclerView.ViewHolder) {
    clear(holder.itemView)
    if (holder is AnimateViewHolder) {
      holder.preAnimateAddImpl(holder)
    } else {
      preAnimateAddImpl(holder)
    }
  }

  private fun doAnimateRemove(holder: RecyclerView.ViewHolder) {
    if (holder is AnimateViewHolder) {
      holder.animateRemoveImpl(holder, DefaultRemoveAnimatorListener(holder))
    } else {
      animateRemoveImpl(holder)
    }
    removeAnimations.add(holder)
  }

  private fun doAnimateAdd(holder: RecyclerView.ViewHolder) {
    if (holder is AnimateViewHolder) {
      holder.animateAddImpl(holder, DefaultAddAnimatorListener(holder))
    } else {
      animateAddImpl(holder)
    }
    addAnimations.add(holder)
  }

  override fun animateRemove(holder: RecyclerView.ViewHolder): Boolean {
    endAnimation(holder)
    preAnimateRemove(holder)
    pendingRemovals.add(holder)
    return true
  }

  protected fun getRemoveDelay(holder: RecyclerView.ViewHolder): Long {
    return abs(holder.oldPosition * removeDuration / 4)
  }

  override fun animateAdd(holder: RecyclerView.ViewHolder): Boolean {
    endAnimation(holder)
    preAnimateAdd(holder)
    pendingAdditions.add(holder)
    return true
  }

  protected fun getAddDelay(holder: RecyclerView.ViewHolder): Long {
    return abs(holder.adapterPosition * addDuration / 4)
  }

  override fun animateMove(
    holder: RecyclerView.ViewHolder,
    fromX: Int,
    fromY: Int,
    toX: Int,
    toY: Int
  ): Boolean {
    var fX = fromX
    var fY = fromY
    val view = holder.itemView
    fX += holder.itemView.translationX.toInt()
    fY += holder.itemView.translationY.toInt()
    endAnimation(holder)
    val deltaX = toX - fX
    val deltaY = toY - fY
    if (deltaX == 0 && deltaY == 0) {
      dispatchMoveFinished(holder)
      return false
    }
    if (deltaX != 0) {
      view.translationX = -deltaX.toFloat()
    }
    if (deltaY != 0) {
      view.translationY = -deltaY.toFloat()
    }
    pendingMoves.add(MoveInfo(holder, fX, fY, toX, toY))
    return true
  }

  private fun animateMoveImpl(
    holder: RecyclerView.ViewHolder,
    fromX: Int,
    fromY: Int,
    toX: Int,
    toY: Int
  ) {
    val view = holder.itemView
    val deltaX = toX - fromX
    val deltaY = toY - fromY
    if (deltaX != 0) {
      view.animate().translationX(0f)
    }
    if (deltaY != 0) {
      view.animate().translationY(0f)
    }
    // TODO: make EndActions end listeners instead, since end actions aren't called when
    // vpas are canceled (and can't end them. why?)
    // need listener functionality in VPACompat for this. Ick.
    moveAnimations.add(holder)
    val animation = view.animate()
    animation.setDuration(moveDuration).setListener(object : AnimatorListenerAdapter() {
      override fun onAnimationStart(animator: Animator) {
        dispatchMoveStarting(holder)
      }

      override fun onAnimationCancel(animator: Animator) {
        if (deltaX != 0) {
          view.translationX = 0f
        }
        if (deltaY != 0) {
          view.translationY = 0f
        }
      }

      override fun onAnimationEnd(animator: Animator) {
        animation.setListener(null)
        dispatchMoveFinished(holder)
        moveAnimations.remove(holder)
        dispatchFinishedWhenDone()
      }
    }).start()
  }

  override fun animateChange(
    oldHolder: RecyclerView.ViewHolder, newHolder: RecyclerView.ViewHolder, fromX: Int, fromY: Int,
    toX: Int, toY: Int
  ): Boolean {
    if (oldHolder === newHolder) {
      // Don't know how to run change animations when the same view holder is re-used.
      // run a move animation to handle position changes.
      return animateMove(oldHolder, fromX, fromY, toX, toY)
    }
    val prevTranslationX = oldHolder.itemView.translationX
    val prevTranslationY = oldHolder.itemView.translationY
    val prevAlpha = oldHolder.itemView.alpha
    endAnimation(oldHolder)
    val deltaX = (toX - fromX - prevTranslationX).toInt()
    val deltaY = (toY - fromY - prevTranslationY).toInt()
    // recover prev translation state after ending animation
    oldHolder.itemView.translationX = prevTranslationX
    oldHolder.itemView.translationY = prevTranslationY
    oldHolder.itemView.alpha = prevAlpha
    // carry over translation values
    endAnimation(newHolder)
    newHolder.itemView.translationX = -deltaX.toFloat()
    newHolder.itemView.translationY = -deltaY.toFloat()
    newHolder.itemView.alpha = 0f
    pendingChanges.add(ChangeInfo(oldHolder, newHolder, fromX, fromY, toX, toY))
    return true
  }

  private fun animateChangeImpl(changeInfo: ChangeInfo) {
    val holder = changeInfo.oldHolder
    val view = holder?.itemView
    val newHolder = changeInfo.newHolder
    val newView = newHolder?.itemView
    if (view != null) {
      if (changeInfo.oldHolder != null) changeAnimations.add(changeInfo.oldHolder!!)
      val oldViewAnim = view.animate().setDuration(
        changeDuration
      )
      oldViewAnim.translationX(changeInfo.toX - changeInfo.fromX.toFloat())
      oldViewAnim.translationY(changeInfo.toY - changeInfo.fromY.toFloat())
      oldViewAnim.alpha(0f).setListener(object : AnimatorListenerAdapter() {
        override fun onAnimationStart(animator: Animator) {
          dispatchChangeStarting(changeInfo.oldHolder, true)
        }

        override fun onAnimationEnd(animator: Animator) {
          oldViewAnim.setListener(null)
          view.alpha = 1f
          view.translationX = 0f
          view.translationY = 0f
          dispatchChangeFinished(changeInfo.oldHolder, true)
          if (changeInfo.oldHolder != null) changeAnimations.remove(changeInfo.oldHolder!!)
          dispatchFinishedWhenDone()
        }
      }).start()
    }
    if (newView != null) {
      if (changeInfo.newHolder != null) changeAnimations.add(changeInfo.newHolder!!)
      val newViewAnimation = newView.animate()
      newViewAnimation.translationX(0f).translationY(0f).setDuration(changeDuration).alpha(1f)
        .setListener(object : AnimatorListenerAdapter() {
          override fun onAnimationStart(animator: Animator) {
            dispatchChangeStarting(changeInfo.newHolder, false)
          }

          override fun onAnimationEnd(animator: Animator) {
            newViewAnimation.setListener(null)
            newView.alpha = 1f
            newView.translationX = 0f
            newView.translationY = 0f
            dispatchChangeFinished(changeInfo.newHolder, false)
            if (changeInfo.newHolder != null) changeAnimations.remove(changeInfo.newHolder!!)
            dispatchFinishedWhenDone()
          }
        }).start()
    }
  }

  private fun endChangeAnimation(infoList: MutableList<ChangeInfo>, item: RecyclerView.ViewHolder) {
    for (i in infoList.indices.reversed()) {
      val changeInfo = infoList[i]
      if (endChangeAnimationIfNecessary(changeInfo, item)) {
        if (changeInfo.oldHolder == null && changeInfo.newHolder == null) {
          infoList.remove(changeInfo)
        }
      }
    }
  }

  private fun endChangeAnimationIfNecessary(changeInfo: ChangeInfo) {
    if (changeInfo.oldHolder != null) {
      endChangeAnimationIfNecessary(changeInfo, changeInfo.oldHolder)
    }
    if (changeInfo.newHolder != null) {
      endChangeAnimationIfNecessary(changeInfo, changeInfo.newHolder)
    }
  }

  private fun endChangeAnimationIfNecessary(
    changeInfo: ChangeInfo,
    item: RecyclerView.ViewHolder?
  ): Boolean {
    var oldItem = false
    when {
      changeInfo.newHolder === item -> {
        changeInfo.newHolder = null
      }
      changeInfo.oldHolder === item -> {
        changeInfo.oldHolder = null
        oldItem = true
      }
      else -> {
        return false
      }
    }
    item!!.itemView.alpha = 1f
    item.itemView.translationX = 0f
    item.itemView.translationY = 0f
    dispatchChangeFinished(item, oldItem)
    return true
  }

  override fun endAnimation(item: RecyclerView.ViewHolder) {
    val view = item.itemView
    // this will trigger end callback which should set properties to their target values.
    view.animate().cancel()
    // TODO if some other animations are chained to end, how do we cancel them as well?
    for (i in pendingMoves.indices.reversed()) {
      val moveInfo = pendingMoves[i]
      if (moveInfo.holder === item) {
        view.translationY = 0f
        view.translationX = 0f
        dispatchMoveFinished(item)
        pendingMoves.removeAt(i)
      }
    }
    endChangeAnimation(pendingChanges, item)
    if (pendingRemovals.remove(item)) {
      clear(item.itemView)
      dispatchRemoveFinished(item)
    }
    if (pendingAdditions.remove(item)) {
      clear(item.itemView)
      dispatchAddFinished(item)
    }
    for (i in changesList.indices.reversed()) {
      val changes = changesList[i]
      endChangeAnimation(changes, item)
      if (changes.isEmpty()) {
        changesList.removeAt(i)
      }
    }
    for (i in movesList.indices.reversed()) {
      val moves = movesList[i]
      for (j in moves.indices.reversed()) {
        val moveInfo = moves[j]
        if (moveInfo.holder === item) {
          view.translationY = 0f
          view.translationX = 0f
          dispatchMoveFinished(item)
          moves.removeAt(j)
          if (moves.isEmpty()) {
            movesList.removeAt(i)
          }
          break
        }
      }
    }
    for (i in additionsList.indices.reversed()) {
      val additions = additionsList[i]
      if (additions.remove(item)) {
        clear(item.itemView)
        dispatchAddFinished(item)
        if (additions.isEmpty()) {
          additionsList.removeAt(i)
        }
      }
    }

    // animations should be ended by the cancel above.
    check(!(removeAnimations.remove(item) && DEBUG)) { "after animation is cancelled, item should not be in " + "mRemoveAnimations list" }
    check(!(addAnimations.remove(item) && DEBUG)) { "after animation is cancelled, item should not be in " + "mAddAnimations list" }
    check(!(changeAnimations.remove(item) && DEBUG)) { "after animation is cancelled, item should not be in " + "mChangeAnimations list" }
    check(!(moveAnimations.remove(item) && DEBUG)) { "after animation is cancelled, item should not be in " + "mMoveAnimations list" }
    dispatchFinishedWhenDone()
  }

  override fun isRunning(): Boolean {
    return (pendingAdditions.isNotEmpty() || pendingChanges.isNotEmpty() || pendingMoves.isNotEmpty()
      || pendingRemovals.isNotEmpty() || moveAnimations.isNotEmpty() || removeAnimations.isNotEmpty()
      || addAnimations.isNotEmpty() || changeAnimations.isNotEmpty() || movesList.isNotEmpty()
      || additionsList.isNotEmpty() || changesList.isNotEmpty())
  }

  /**
   * Check the state of currently pending and running animations. If there are none
   * pending/running, call #dispatchAnimationsFinished() to notify any
   * listeners.
   */
  private fun dispatchFinishedWhenDone() {
    if (!isRunning) {
      dispatchAnimationsFinished()
    }
  }

  override fun endAnimations() {
    var count = pendingMoves.size
    for (i in count - 1 downTo 0) {
      val item = pendingMoves[i]
      val view = item.holder.itemView
      view.translationY = 0f
      view.translationX = 0f
      dispatchMoveFinished(item.holder)
      pendingMoves.removeAt(i)
    }
    count = pendingRemovals.size
    for (i in count - 1 downTo 0) {
      val item = pendingRemovals[i]
      dispatchRemoveFinished(item)
      pendingRemovals.removeAt(i)
    }
    count = pendingAdditions.size
    for (i in count - 1 downTo 0) {
      val item = pendingAdditions[i]
      clear(item.itemView)
      dispatchAddFinished(item)
      pendingAdditions.removeAt(i)
    }
    count = pendingChanges.size
    for (i in count - 1 downTo 0) {
      endChangeAnimationIfNecessary(pendingChanges[i])
    }
    pendingChanges.clear()
    if (!isRunning) {
      return
    }
    var listCount = movesList.size
    for (i in listCount - 1 downTo 0) {
      val moves = movesList[i]
      count = moves.size
      for (j in count - 1 downTo 0) {
        val moveInfo = moves[j]
        val item = moveInfo.holder
        val view = item.itemView
        view.translationY = 0f
        view.translationX = 0f
        dispatchMoveFinished(moveInfo.holder)
        moves.removeAt(j)
        if (moves.isEmpty()) {
          movesList.remove(moves)
        }
      }
    }
    listCount = additionsList.size
    for (i in listCount - 1 downTo 0) {
      val additions = additionsList[i]
      count = additions.size
      for (j in count - 1 downTo 0) {
        val item = additions[j]
        val view = item.itemView
        view.alpha = 1f
        dispatchAddFinished(item)
        //this check prevent exception when removal already happened during finishing animation
        if (j < additions.size) {
          additions.removeAt(j)
        }
        if (additions.isEmpty()) {
          additionsList.remove(additions)
        }
      }
    }
    listCount = changesList.size
    for (i in listCount - 1 downTo 0) {
      val changes = changesList[i]
      count = changes.size
      for (j in count - 1 downTo 0) {
        endChangeAnimationIfNecessary(changes[j])
        if (changes.isEmpty()) {
          changesList.remove(changes)
        }
      }
    }
    cancelAll(removeAnimations)
    cancelAll(moveAnimations)
    cancelAll(addAnimations)
    cancelAll(changeAnimations)
    dispatchAnimationsFinished()
  }

  private fun cancelAll(viewHolders: List<RecyclerView.ViewHolder>) {
    for (i in viewHolders.indices.reversed()) {
      viewHolders[i].itemView.animate().cancel()
    }
  }

  open class AnimatorListenerAdapter : Animator.AnimatorListener {
    override fun onAnimationStart(animator: Animator) {}
    override fun onAnimationEnd(animator: Animator) {}
    override fun onAnimationCancel(animator: Animator) {}
    override fun onAnimationRepeat(animator: Animator) {}
  }

  inner class DefaultAddAnimatorListener(var viewHolder: RecyclerView.ViewHolder) :
    AnimatorListenerAdapter() {
    override fun onAnimationStart(animator: Animator) {
      dispatchAddStarting(viewHolder)
    }

    override fun onAnimationCancel(animator: Animator) {
      clear(viewHolder.itemView)
    }

    override fun onAnimationEnd(animator: Animator) {
      clear(viewHolder.itemView)
      dispatchAddFinished(viewHolder)
      addAnimations.remove(viewHolder)
      dispatchFinishedWhenDone()
    }
  }

  protected inner class DefaultRemoveAnimatorListener(var viewHolder: RecyclerView.ViewHolder) :
    AnimatorListenerAdapter() {
    override fun onAnimationStart(animator: Animator) {
      dispatchRemoveStarting(viewHolder)
    }

    override fun onAnimationCancel(animator: Animator) {
      clear(viewHolder.itemView)
    }

    override fun onAnimationEnd(animator: Animator) {
      clear(viewHolder.itemView)
      dispatchRemoveFinished(viewHolder)
      removeAnimations.remove(viewHolder)
      dispatchFinishedWhenDone()
    }
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/FadeInAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class FadeInAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      alpha(0f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.alpha = 0f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      alpha(1f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/FadeInDownAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class FadeInDownAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationY(-holder.itemView.height * .25f)
      alpha(0f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.translationY = -holder.itemView.height * .25f
    holder.itemView.alpha = 0f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationY(0f)
      alpha(1f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/FadeInLeftAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class FadeInLeftAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationX(-holder.itemView.rootView.width * .25f)
      alpha(0f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.translationX = -holder.itemView.rootView.width * .25f
    holder.itemView.alpha = 0f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationX(0f)
      alpha(1f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/FadeInRightAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class FadeInRightAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationX(holder.itemView.rootView.width * .25f)
      alpha(0f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.translationX = holder.itemView.rootView.width * .25f
    holder.itemView.alpha = 0f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationX(0f)
      alpha(1f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/FadeInUpAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class FadeInUpAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationY(holder.itemView.height * .25f)
      alpha(0f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.translationY = holder.itemView.height * .25f
    holder.itemView.alpha = 0f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationY(0f)
      alpha(1f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/FlipInBottomXAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class FlipInBottomXAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      rotationX(-90f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.rotationX = -90f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      rotationX(0f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/FlipInLeftYAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class FlipInLeftYAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      rotationY(90f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.rotationY = 90f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      rotationY(0f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/FlipInRightYAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class FlipInRightYAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      rotationY(-90f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.rotationY = -90f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      rotationY(0f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/FlipInTopXAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class FlipInTopXAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      rotationX(90f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.rotationX = 90f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      rotationX(0f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/LandingAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class LandingAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      alpha(0f)
        .scaleX(1.5f)
        .scaleY(1.5f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.alpha = 0f
    holder.itemView.scaleX = 1.5f
    holder.itemView.scaleY = 1.5f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      alpha(1f)
      scaleX(1f)
      scaleY(1f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/OvershootInLeftAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.OvershootInterpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class OvershootInLeftAnimator : BaseItemAnimator {
  private val tension: Float

  constructor() {
    tension = 2.0f
  }

  constructor(tension: Float) {
    this.tension = tension
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationX(-holder.itemView.rootView.width.toFloat())
      duration = removeDuration
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.translationX = -holder.itemView.rootView.width.toFloat()
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationX(0f)
      duration = addDuration
      setListener(DefaultAddAnimatorListener(holder))
      interpolator = OvershootInterpolator(tension)
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/OvershootInRightAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.OvershootInterpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class OvershootInRightAnimator : BaseItemAnimator {
  private val tension: Float

  constructor() {
    tension = 2.0f
  }

  constructor(tension: Float) {
    this.tension = tension
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationX(holder.itemView.rootView.width.toFloat())
      duration = removeDuration
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.translationX = holder.itemView.rootView.width.toFloat()
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationX(0f)
      duration = addDuration
      interpolator = OvershootInterpolator(tension)
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/ScaleInAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class ScaleInAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      scaleX(0f)
      scaleY(0f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.scaleX = 0f
    holder.itemView.scaleY = 0f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      scaleX(1f)
      scaleY(1f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/ScaleInBottomAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class ScaleInBottomAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun preAnimateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.pivotY = holder.itemView.height.toFloat()
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      scaleX(0f)
      scaleY(0f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.pivotY = holder.itemView.height.toFloat()
    holder.itemView.scaleX = 0f
    holder.itemView.scaleY = 0f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      scaleX(1f)
      scaleY(1f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/ScaleInLeftAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class ScaleInLeftAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun preAnimateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.pivotX = 0f
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      scaleX(0f)
      scaleY(0f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.pivotX = 0f
    holder.itemView.scaleX = 0f
    holder.itemView.scaleY = 0f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      scaleX(1f)
      scaleY(1f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/ScaleInRightAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class ScaleInRightAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun preAnimateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.pivotX = holder.itemView.width.toFloat()
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      scaleX(0f)
      scaleY(0f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.pivotX = holder.itemView.width.toFloat()
    holder.itemView.scaleX = 0f
    holder.itemView.scaleY = 0f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      scaleX(1f)
      scaleY(1f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/ScaleInTopAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class ScaleInTopAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun preAnimateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.pivotY = 0f
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      scaleX(0f)
      scaleY(0f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.pivotY = 0f
    holder.itemView.scaleX = 0f
    holder.itemView.scaleY = 0f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      scaleX(1f)
      scaleY(1f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/SlideInDownAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class SlideInDownAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationY(-holder.itemView.height.toFloat())
      alpha(0f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.translationY = -holder.itemView.height.toFloat()
    holder.itemView.alpha = 0f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationY(0f)
      alpha(1f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/SlideInLeftAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class SlideInLeftAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationX(-holder.itemView.rootView.width.toFloat())
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.translationX = -holder.itemView.rootView.width.toFloat()
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationX(0f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/SlideInRightAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class SlideInRightAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationX(holder.itemView.rootView.width.toFloat())
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.translationX = holder.itemView.rootView.width.toFloat()
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationX(0f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/SlideInUpAnimator.kt
================================================
package jp.wasabeef.recyclerview.animators

import android.view.animation.Interpolator
import androidx.recyclerview.widget.RecyclerView

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
open class SlideInUpAnimator : BaseItemAnimator {
  constructor()
  constructor(interpolator: Interpolator) {
    this.interpolator = interpolator
  }

  override fun animateRemoveImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationY(holder.itemView.height.toFloat())
      alpha(0f)
      duration = removeDuration
      interpolator = interpolator
      setListener(DefaultRemoveAnimatorListener(holder))
      startDelay = getRemoveDelay(holder)
    }.start()
  }

  override fun preAnimateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.translationY = holder.itemView.height.toFloat()
    holder.itemView.alpha = 0f
  }

  override fun animateAddImpl(holder: RecyclerView.ViewHolder) {
    holder.itemView.animate().apply {
      translationY(0f)
      alpha(1f)
      duration = addDuration
      interpolator = interpolator
      setListener(DefaultAddAnimatorListener(holder))
      startDelay = getAddDelay(holder)
    }.start()
  }
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/animators/holder/AnimateViewHolder.kt
================================================
package jp.wasabeef.recyclerview.animators.holder

import android.animation.Animator
import androidx.recyclerview.widget.RecyclerView

interface AnimateViewHolder {
  fun preAnimateAddImpl(holder: RecyclerView.ViewHolder)
  fun preAnimateRemoveImpl(holder: RecyclerView.ViewHolder)
  fun animateAddImpl(holder: RecyclerView.ViewHolder, listener: Animator.AnimatorListener)
  fun animateRemoveImpl(
    holder: RecyclerView.ViewHolder,
    listener: Animator.AnimatorListener
  )
}


================================================
FILE: animators/src/main/java/jp/wasabeef/recyclerview/internal/ViewHelper.kt
================================================
package jp.wasabeef.recyclerview.internal

import android.view.View

/**
 * Copyright (C) 2021 Daichi Furiya / Wasabeef
 *
 * 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.
 */
object ViewHelper {
  @JvmStatic
  fun clear(v: View) {
    v.apply {
      alpha = 1f
      scaleY = 1f
      scaleX = 1f
      translationY = 0f
      translationX = 0f
      rotation = 0f
      rotationY = 0f
      rotationX = 0f
      pivotY = v.measuredHeight / 2f
      pivotX = v.measuredWidth / 2f
      animate().setInterpolator(null).startDelay = 0
    }
  }
}


================================================
FILE: build.gradle
================================================
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
  ext.kotlin_version = '1.3.72'
  repositories {
    google()
    jcenter()
  }
  dependencies {
    classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
    classpath 'com.android.tools.build:gradle:4.2.0-beta04'
    classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  }
}

allprojects {
  repositories {
    google()
    mavenCentral()
    jcenter()
  }
  tasks.withType(Javadoc) {
    enabled = false
  }
}


================================================
FILE: example/build.gradle
================================================
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
  compileSdkVersion COMPILE_SDK_VERSION as int

  defaultConfig {
    minSdkVersion MIN_SDK_VERSION as int
    targetSdkVersion TARGET_SDK_VERSION as int
    versionCode VERSION_CODE as int
    versionName VERSION_NAME
  }

  // SigningConfigs
  apply from: '../signingConfigs/debug.gradle', to: android

  buildTypes {
    debug {
      debuggable true
      signingConfig signingConfigs.debug
    }
    release {
      debuggable false
      zipAlignEnabled true
    }
  }
}

repositories {
  // maven { url = "https://oss.sonatype.org/content/repositories/snapshots"}
}

dependencies {
  implementation project(':animators')
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  implementation "androidx.appcompat:appcompat:1.2.0"
  implementation "androidx.recyclerview:recyclerview:1.1.0"
  implementation 'com.squareup.picasso:picasso:2.8'
}


================================================
FILE: example/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  package="jp.wasabeef.example.recyclerview"
  >

  <application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    tools:ignore="GoogleAppIndexingWarning"
    >
    <activity
      android:name=".MainActivity"
      android:label="@string/app_name"
      >
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>

    <activity android:name=".AnimatorSampleActivity" />
    <activity android:name=".AdapterSampleActivity" />

  </application>

</manifest>


================================================
FILE: example/src/main/java/jp/wasabeef/example/recyclerview/AdapterSampleActivity.kt
================================================
package jp.wasabeef.example.recyclerview

import android.content.Context
import android.os.Bundle
import android.view.View
import android.view.animation.OvershootInterpolator
import android.widget.AdapterView
import android.widget.ArrayAdapter
import android.widget.Spinner
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import jp.wasabeef.recyclerview.adapters.AlphaInAnimationAdapter
import jp.wasabeef.recyclerview.adapters.AnimationAdapter
import jp.wasabeef.recyclerview.adapters.ScaleInAnimationAdapter
import jp.wasabeef.recyclerview.adapters.SlideInBottomAnimationAdapter
import jp.wasabeef.recyclerview.adapters.SlideInLeftAnimationAdapter
import jp.wasabeef.recyclerview.adapters.SlideInRightAnimationAdapter
import jp.wasabeef.recyclerview.animators.FadeInAnimator

/**
 * Created by Daichi Furiya / Wasabeef on 2020/08/26.
 */
class AdapterSampleActivity : AppCompatActivity() {

  internal enum class Type {
    AlphaIn {
      override operator fun get(context: Context): AnimationAdapter {
        return AlphaInAnimationAdapter(MainAdapter(context, SampleData.LIST.toMutableList()))
      }
    },
    ScaleIn {
      override operator fun get(context: Context): AnimationAdapter {
        return ScaleInAnimationAdapter(MainAdapter(context, SampleData.LIST.toMutableList()))
      }
    },
    SlideInBottom {
      override operator fun get(context: Context): AnimationAdapter {
        return SlideInBottomAnimationAdapter(MainAdapter(context, SampleData.LIST.toMutableList()))
      }
    },
    SlideInLeft {
      override operator fun get(context: Context): AnimationAdapter {
        return SlideInLeftAnimationAdapter(MainAdapter(context, SampleData.LIST.toMutableList()))
      }
    },
    SlideInRight {
      override operator fun get(context: Context): AnimationAdapter {
        return SlideInRightAnimationAdapter(MainAdapter(context, SampleData.LIST.toMutableList()))
      }
    };

    abstract operator fun get(context: Context): AnimationAdapter
  }

  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_adapter_sample)

    setSupportActionBar(findViewById(R.id.tool_bar))
    supportActionBar?.setDisplayShowTitleEnabled(false)

    val recyclerView = findViewById<RecyclerView>(R.id.list)
    recyclerView.layoutManager = if (intent.getBooleanExtra(MainActivity.KEY_GRID, true)) {
      GridLayoutManager(this, 2)
    } else {
      LinearLayoutManager(this)
    }

    val spinner = findViewById<Spinner>(R.id.spinner)
    spinner.adapter = ArrayAdapter<String>(this, android.R.layout.simple_list_item_1).apply {
      for (type in Type.values()) add(type.name)
    }
    spinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
      override fun onItemSelected(parent: AdapterView<*>, view: View, position: Int, id: Long) {
        recyclerView.adapter = Type.values()[position][view.context].apply {
          setFirstOnly(true)
          setDuration(500)
          setInterpolator(OvershootInterpolator(.5f))
        }
      }

      override fun onNothingSelected(parent: AdapterView<*>) {
        // no-op
      }
    }

    recyclerView.itemAnimator = FadeInAnimator()
    val adapter = MainAdapter(this, SampleData.LIST.toMutableList())
    recyclerView.adapter = AlphaInAnimationAdapter(adapter).apply {
      setFirstOnly(true)
      setDuration(500)
      setInterpolator(OvershootInterpolator(.5f))
    }
  }
}


================================================
FILE: example/src/main/java/jp/wasabeef/example/recyclerview/AnimatorSampleActivity.kt
================================================
package jp.wasabeef.example.recyclerview

import android.os.Bundle
import android.view.View
import android.widget.AdapterView
import android.widget.ArrayAdapter
import android.widget.Spinner
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import jp.wasabeef.recyclerview.animators.BaseItemAnimator
import jp.wasabeef.recyclerview.animators.FadeInAnimator
import jp.wasabeef.recyclerview.animators.FadeInDownAnimator
import jp.wasabeef.recyclerview.animators.FadeInLeftAnimator
import jp.wasabeef.recyclerview.animators.FadeInRightAnimator
import jp.wasabeef.recyclerview.animators.FadeInUpAnimator
import jp.wasabeef.recyclerview.animators.FlipInBottomXAnimator
import jp.wasabeef.recyclerview.animators.FlipInLeftYAnimator
import jp.wasabeef.recyclerview.animators.FlipInRightYAnimator
import jp.wasabeef.recyclerview.animators.FlipInTopXAnimator
import jp.wasabeef.recyclerview.animators.LandingAnimator
import jp.wasabeef.recyclerview.animators.OvershootInLeftAnimator
import jp.wasabeef.recyclerview.animators.OvershootInRightAnimator
import jp.wasabeef.recyclerview.animators.ScaleInAnimator
import jp.wasabeef.recyclerview.animators.ScaleInBottomAnimator
import jp.wasabeef.recyclerview.animators.ScaleInLeftAnimator
import jp.wasabeef.recyclerview.animators.ScaleInRightAnimator
import jp.wasabeef.recyclerview.animators.ScaleInTopAnimator
import jp.wasabeef.recyclerview.animators.SlideInDownAnimator
import jp.wasabeef.recyclerview.animators.SlideInLeftAnimator
import jp.wasabeef.recyclerview.animators.SlideInRightAnimator
import jp.wasabeef.recyclerview.animators.SlideInUpAnimator

/**
 * Created by Daichi Furiya / Wasabeef on 2020/08/26.
 */
class AnimatorSampleActivity : AppCompatActivity() {

  internal enum class Type(val animator: BaseItemAnimator) {
    FadeIn(FadeInAnimator()),
    FadeInDown(FadeInDownAnimator()),
    FadeInUp(FadeInUpAnimator()),
    FadeInLeft(FadeInLeftAnimator()),
    FadeInRight(FadeInRightAnimator()),
    Landing(LandingAnimator()),
    ScaleIn(ScaleInAnimator()),
    ScaleInTop(ScaleInTopAnimator()),
    ScaleInBottom(ScaleInBottomAnimator()),
    ScaleInLeft(ScaleInLeftAnimator()),
    ScaleInRight(ScaleInRightAnimator()),
    FlipInTopX(FlipInTopXAnimator()),
    FlipInBottomX(FlipInBottomXAnimator()),
    FlipInLeftY(FlipInLeftYAnimator()),
    FlipInRightY(FlipInRightYAnimator()),
    SlideInLeft(SlideInLeftAnimator()),
    SlideInRight(SlideInRightAnimator()),
    SlideInDown(SlideInDownAnimator()),
    SlideInUp(SlideInUpAnimator()),
    OvershootInRight(OvershootInRightAnimator(1.0f)),
    OvershootInLeft(OvershootInLeftAnimator(1.0f))
  }

  private val adapter = MainAdapter(this, SampleData.LIST.toMutableList())

  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_animator_sample)

    setSupportActionBar(findViewById(R.id.tool_bar))
    supportActionBar?.setDisplayShowTitleEnabled(false)

    val recyclerView = findViewById<RecyclerView>(R.id.list)
    recyclerView.apply {
      itemAnimator = SlideInLeftAnimator()
      adapter = this@AnimatorSampleActivity.adapter

      layoutManager = if (intent.getBooleanExtra(MainActivity.KEY_GRID, true)) {
        GridLayoutManager(context, 2)
      } else {
        LinearLayoutManager(context)
      }
    }


    val spinner = findViewById<Spinner>(R.id.spinner)
    val spinnerAdapter = ArrayAdapter<String>(this, android.R.layout.simple_list_item_1)
    for (type in Type.values()) {
      spinnerAdapter.add(type.name)
    }
    spinner.adapter = spinnerAdapter
    spinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
      override fun onItemSelected(parent: AdapterView<*>, view: View, position: Int, id: Long) {
        recyclerView.itemAnimator = Type.values()[position].animator
        recyclerView.itemAnimator?.addDuration = 500
        recyclerView.itemAnimator?.removeDuration = 500
      }

      override fun onNothingSelected(parent: AdapterView<*>) {
        // no-op
      }
    }

    findViewById<View>(R.id.add).setOnClickListener { adapter.add("newly added item", 1) }

    findViewById<View>(R.id.del).setOnClickListener { adapter.remove(1) }
  }

}


================================================
FILE: example/src/main/java/jp/wasabeef/example/recyclerview/MainActivity.kt
================================================
package jp.wasabeef.example.recyclerview

import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.SwitchCompat

/**
 * Created by Daichi Furiya / Wasabeef on 2020/08/26.
 */
class MainActivity : AppCompatActivity() {

  companion object {
    const val KEY_GRID = "GRID"
  }

  private var enabledGrid = false

  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_main)

    findViewById<View>(R.id.btn_animator_sample).setOnClickListener {
      startActivity(Intent(this, AnimatorSampleActivity::class.java).apply {
        putExtra(KEY_GRID, enabledGrid)
      })
    }

    findViewById<View>(R.id.btn_adapter_sample).setOnClickListener {
      startActivity(Intent(this, AdapterSampleActivity::class.java).apply {
        putExtra(KEY_GRID, enabledGrid)
      })
    }

    findViewById<SwitchCompat>(R.id.grid).setOnCheckedChangeListener { _, isChecked ->
      enabledGrid = isChecked
    }
  }
}


================================================
FILE: example/src/main/java/jp/wasabeef/example/recyclerview/MainAdapter.kt
================================================
package jp.wasabeef.example.recyclerview

import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.squareup.picasso.Picasso

/**
 * Created by Daichi Furiya / Wasabeef on 2020/08/26.
 */
class MainAdapter(private val context: Context, private val dataSet: MutableList<String>) :
  RecyclerView.Adapter<MainAdapter.ViewHolder>() {

  override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
    val v = LayoutInflater.from(context).inflate(R.layout.layout_list_item, parent, false)
    return ViewHolder(v)
  }

  override fun onBindViewHolder(holder: ViewHolder, position: Int) {
    Picasso.get().load(R.drawable.chip).into(holder.image)
    holder.text.text = dataSet[position]
  }

  override fun getItemCount(): Int {
    return dataSet.size
  }

  fun remove(position: Int) {
    dataSet.removeAt(position)
    notifyItemRemoved(position)
  }

  fun add(text: String, position: Int) {
    dataSet.add(position, text)
    notifyItemInserted(position)
  }

  class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {

    var image: ImageView = itemView.findViewById<View>(R.id.image) as ImageView
    var text: TextView = itemView.findViewById<View>(R.id.text) as TextView

  }
}


================================================
FILE: example/src/main/java/jp/wasabeef/example/recyclerview/MyAnimationAdapter.kt
================================================
package jp.wasabeef.example.recyclerview

import androidx.recyclerview.widget.RecyclerView
import jp.wasabeef.recyclerview.adapters.AlphaInAnimationAdapter

class MyAnimatorAdapter constructor(
  adapter: RecyclerView.Adapter<out RecyclerView.ViewHolder>,
  from: Float = 0.5f
) : AlphaInAnimationAdapter(adapter, from) {
}


================================================
FILE: example/src/main/java/jp/wasabeef/example/recyclerview/MyAnimator.kt
================================================
package jp.wasabeef.example.recyclerview

import android.view.animation.Interpolator
import androidx.interpolator.view.animation.LinearOutSlowInInterpolator
import jp.wasabeef.recyclerview.animators.ScaleInRightAnimator

class MyAnimator(
  interpolator: Interpolator = LinearOutSlowInInterpolator()
) : ScaleInRightAnimator(interpolator) {
}


================================================
FILE: example/src/main/java/jp/wasabeef/example/recyclerview/SampleData.kt
================================================
package jp.wasabeef.example.recyclerview

/**
 * Created by Daichi Furiya / Wasabeef on 2020/08/26.
 */
interface SampleData {
  companion object {
    val LIST = arrayOf(
      "Apple", "Ball", "Camera", "Day", "Egg", "Foo", "Google", "Hello",
      "Iron", "Japan", "Coke", "Dog", "Cat", "Yahoo", "Sony", "Canon", "Fujitsu", "USA", "Nexus",
      "LINE", "Haskell", "C++", "Java", "Go", "Swift", "Objective-c", "Ruby", "PHP", "Bash", "ksh",
      "C", "Groovy", "Kotlin", "Chip", "Japan", "U.S.A", "San Francisco", "Paris", "Tokyo",
      "Silicon Valley", "London", "Spain", "China", "Taiwan", "Asia", "New York", "France", "Kyoto",
      "Android", "Google", "iPhone", "iPad", "iPod", "Wasabeef"
    )
  }
}


================================================
FILE: example/src/main/res/layout/activity_adapter_sample.xml
================================================
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  >

  <androidx.appcompat.widget.Toolbar
    android:id="@+id/tool_bar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="#3DC49D"
    android:minHeight="?attr/actionBarSize"
    >

    <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      >

      <Spinner
        android:id="@+id/spinner"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        />

    </RelativeLayout>

  </androidx.appcompat.widget.Toolbar>

  <androidx.recyclerview.widget.RecyclerView
    android:id="@+id/list"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    />

</LinearLayout>


================================================
FILE: example/src/main/res/layout/activity_animator_sample.xml
================================================
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  >

  <androidx.appcompat.widget.Toolbar
    android:id="@+id/tool_bar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="#3DC49D"
    android:minHeight="?attr/actionBarSize"
    >

    <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      >

      <Spinner
        android:id="@+id/spinner"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        />

      <TextView
        android:id="@+id/del"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_centerInParent="true"
        android:background="?attr/selectableItemBackground"
        android:padding="10dp"
        android:text="DEL"
        />

      <TextView
        android:id="@+id/add"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:layout_toLeftOf="@id/del"
        android:background="?attr/selectableItemBackground"
        android:padding="10dp"
        android:text="ADD"
        />

    </RelativeLayout>

  </androidx.appcompat.widget.Toolbar>

  <androidx.recyclerview.widget.RecyclerView
    android:id="@+id/list"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    />

</LinearLayout>


================================================
FILE: example/src/main/res/layout/activity_main.xml
================================================
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:layout_centerInParent="true"
  >

  <Button
    android:id="@+id/btn_animator_sample"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Animator Sample Activity"
    />

  <Button
    android:id="@+id/btn_adapter_sample"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Adapter Sample Activity"
    />

  <androidx.appcompat.widget.SwitchCompat
    android:id="@+id/grid"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="right"
    android:text="Set to Grid"
    />

</LinearLayout>


================================================
FILE: example/src/main/res/layout/layout_list_item.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:padding="20dp"
  >

  <ImageView
    android:id="@+id/image"
    android:layout_width="match_parent"
    android:layout_height="100dp"
    android:background="#11000000"
    android:scaleType="centerCrop"
    />

  <TextView
    android:id="@+id/text"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"
    android:textSize="18sp"
    />

</LinearLayout>

================================================
FILE: example/src/main/res/values/dimens.xml
================================================
<resources>
  <!-- Default screen margins, per the Android Design guidelines. -->
  <dimen name="activity_horizontal_margin">16dp</dimen>
  <dimen name="activity_vertical_margin">16dp</dimen>
</resources>


================================================
FILE: example/src/main/res/values/strings.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>

  <string name="app_name">RecyclerViewAnimators</string>

</resources>


================================================
FILE: example/src/main/res/values/styles.xml
================================================
<resources>

  <!-- Base application theme. -->
  <style name="AppTheme" parent="Theme.AppCompat.Light">
    <!-- Customize your theme here. -->
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
    <item name="android:windowNoTitle">true</item>

  </style>
</resources>


================================================
FILE: gradle/wrapper/gradle-wrapper.properties
================================================
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists


================================================
FILE: gradle.properties
================================================
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
org.gradle.parallel=true
org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.caching=true
android.enableBuildCache=true
android.useAndroidX=true
android.enableJetifier=false

# Use R8 instead of ProGuard for code shrinking.
android.enableR8=true
android.enableR8.fullMode=true

VERSION_NAME=4.0.1
VERSION_CODE=401
GROUP=jp.wasabeef

COMPILE_SDK_VERSION=30
TARGET_SDK_VERSION=30
MIN_SDK_VERSION=21


================================================
FILE: gradlew
================================================
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# 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
#
#      https://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.
#

##############################################################################
##
##  Gradle start up script for UN*X
##
##############################################################################

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        PRG="$link"
    else
        PRG=`dirname "$PRG"`"/$link"
    fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn () {
    echo "$*"
}

die () {
    echo
    echo "$*"
    echo
    exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
  CYGWIN* )
    cygwin=true
    ;;
  Darwin* )
    darwin=true
    ;;
  MINGW* )
    msys=true
    ;;
  NONSTOP* )
    nonstop=true
    ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar


# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
    else
        JAVACMD="$JAVA_HOME/bin/java"
    fi
    if [ ! -x "$JAVACMD" ] ; then
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
    fi
else
    JAVACMD="java"
    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
    MAX_FD_LIMIT=`ulimit -H -n`
    if [ $? -eq 0 ] ; then
        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
            MAX_FD="$MAX_FD_LIMIT"
        fi
        ulimit -n $MAX_FD
        if [ $? -ne 0 ] ; then
            warn "Could not set maximum file descriptor limit: $MAX_FD"
        fi
    else
        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
    fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`

    JAVACMD=`cygpath --unix "$JAVACMD"`

    # We build the pattern for arguments to be converted via cygpath
    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
    SEP=""
    for dir in $ROOTDIRSRAW ; do
        ROOTDIRS="$ROOTDIRS$SEP$dir"
        SEP="|"
    done
    OURCYGPATTERN="(^($ROOTDIRS))"
    # Add a user-defined pattern to the cygpath arguments
    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
    fi
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
    i=0
    for arg in "$@" ; do
        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option

        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
        else
            eval `echo args$i`="\"$arg\""
        fi
        i=`expr $i + 1`
    done
    case $i in
        0) set -- ;;
        1) set -- "$args0" ;;
        2) set -- "$args0" "$args1" ;;
        3) set -- "$args0" "$args1" "$args2" ;;
        4) set -- "$args0" "$args1" "$args2" "$args3" ;;
        5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
        6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
        7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
        8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
        9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
    esac
fi

# Escape application args
save () {
    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
    echo " "
}
APP_ARGS=`save "$@"`

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

exec "$JAVACMD" "$@"


================================================
FILE: gradlew.bat
================================================
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem      https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega


================================================
FILE: settings.gradle
================================================
include ':example', ':animators'


================================================
FILE: signingConfigs/debug.gradle
================================================
signingConfigs {
  debug {
    storeFile file("debug.keystore")
    storePassword "android"
    keyAlias "androiddebugkey"
    keyPassword "android"
  }
}

// $ keytool -v -list -keystore
// Certificate fingerprints:
// MD5:  28:22:7C:A4:B9:2F:6E:C7:D5:58:62:48:EB:7E:82:C3
// SHA1: 94:25:A9:50:9C:0E:AE:AA:00:37:5E:D6:71:E3:BC:ED:17:E5:0C:A3
// SHA256: 04:92:39:09:3D:1C:B6:16:BE:55:58:A3:5F:3B:BB:CB:0B:E7:F1:DA:AA:26:C5:2D:BD:2F:44:CF:AE:47:CF:87
Download .txt
gitextract__i4k753b/

├── .editorconfig
├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── workflows/
│       └── gradle-build.yml
├── .gitignore
├── .idea/
│   ├── codeStyles/
│   │   ├── Project.xml
│   │   └── codeStyleConfig.xml
│   ├── encodings.xml
│   ├── runConfigurations.xml
│   └── vcs.xml
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── animators/
│   ├── build.gradle
│   └── src/
│       ├── androidTest/
│       │   └── java/
│       │       └── jp/
│       │           └── wasabeef/
│       │               └── recyclerview/
│       │                   └── ApplicationTest.java
│       └── main/
│           ├── AndroidManifest.xml
│           └── java/
│               └── jp/
│                   └── wasabeef/
│                       └── recyclerview/
│                           ├── adapters/
│                           │   ├── AlphaInAnimationAdapter.kt
│                           │   ├── AnimationAdapter.kt
│                           │   ├── ScaleInAnimationAdapter.kt
│                           │   ├── SlideInBottomAnimationAdapter.kt
│                           │   ├── SlideInLeftAnimationAdapter.kt
│                           │   └── SlideInRightAnimationAdapter.kt
│                           ├── animators/
│                           │   ├── BaseItemAnimator.kt
│                           │   ├── FadeInAnimator.kt
│                           │   ├── FadeInDownAnimator.kt
│                           │   ├── FadeInLeftAnimator.kt
│                           │   ├── FadeInRightAnimator.kt
│                           │   ├── FadeInUpAnimator.kt
│                           │   ├── FlipInBottomXAnimator.kt
│                           │   ├── FlipInLeftYAnimator.kt
│                           │   ├── FlipInRightYAnimator.kt
│                           │   ├── FlipInTopXAnimator.kt
│                           │   ├── LandingAnimator.kt
│                           │   ├── OvershootInLeftAnimator.kt
│                           │   ├── OvershootInRightAnimator.kt
│                           │   ├── ScaleInAnimator.kt
│                           │   ├── ScaleInBottomAnimator.kt
│                           │   ├── ScaleInLeftAnimator.kt
│                           │   ├── ScaleInRightAnimator.kt
│                           │   ├── ScaleInTopAnimator.kt
│                           │   ├── SlideInDownAnimator.kt
│                           │   ├── SlideInLeftAnimator.kt
│                           │   ├── SlideInRightAnimator.kt
│                           │   ├── SlideInUpAnimator.kt
│                           │   └── holder/
│                           │       └── AnimateViewHolder.kt
│                           └── internal/
│                               └── ViewHelper.kt
├── build.gradle
├── example/
│   ├── build.gradle
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── jp/
│           │       └── wasabeef/
│           │           └── example/
│           │               └── recyclerview/
│           │                   ├── AdapterSampleActivity.kt
│           │                   ├── AnimatorSampleActivity.kt
│           │                   ├── MainActivity.kt
│           │                   ├── MainAdapter.kt
│           │                   ├── MyAnimationAdapter.kt
│           │                   ├── MyAnimator.kt
│           │                   └── SampleData.kt
│           └── res/
│               ├── layout/
│               │   ├── activity_adapter_sample.xml
│               │   ├── activity_animator_sample.xml
│               │   ├── activity_main.xml
│               │   └── layout_list_item.xml
│               └── values/
│                   ├── dimens.xml
│                   ├── strings.xml
│                   └── styles.xml
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── signingConfigs/
    ├── debug.gradle
    └── debug.keystore
Download .txt
SYMBOL INDEX (2 symbols across 1 files)

FILE: animators/src/androidTest/java/jp/wasabeef/recyclerview/ApplicationTest.java
  class ApplicationTest (line 9) | public class ApplicationTest extends ApplicationTestCase<Application> {
    method ApplicationTest (line 11) | public ApplicationTest() {
Condensed preview — 73 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (160K chars).
[
  {
    "path": ".editorconfig",
    "chars": 120,
    "preview": "[*.{kt,kts,java}]\nindent_size=2\nmax_line_length=off\ninsert_final_newline=true\n\n[*.{kt,kts}]\nkotlin_imports_layout=ascii\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 720,
    "preview": "# These are supported funding model platforms\n\ngithub: wasabeef # Replace with up to 4 GitHub Sponsors-enabled usernames"
  },
  {
    "path": ".github/ISSUE_TEMPLATE.md",
    "chars": 351,
    "preview": "# Future Task\n\n## What is the motivation?\n\n## What kind of solution can be considered?\n\n## What do you want to discuss?\n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "chars": 102,
    "preview": "## What does this change?\n\n## What is the value of this and can you measure success?\n\n## Screenshots\n\n"
  },
  {
    "path": ".github/workflows/gradle-build.yml",
    "chars": 273,
    "preview": "name: \"Gradle build\"\non: [push, pull_request]\n\njobs:\n  gradle:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actio"
  },
  {
    "path": ".gitignore",
    "chars": 1019,
    "preview": "# Mac OS\n.DS_store\n\n# Built application files\n*.apk\n*.ap_\n\n# Files for the ART/Dalvik VM\n*.dex\n\n# Java class files\n*.cla"
  },
  {
    "path": ".idea/codeStyles/Project.xml",
    "chars": 16278,
    "preview": "<component name=\"ProjectCodeStyleConfiguration\">\n  <code_scheme name=\"Project\" version=\"173\">\n    <option name=\"USE_SAME"
  },
  {
    "path": ".idea/codeStyles/codeStyleConfig.xml",
    "chars": 221,
    "preview": "<component name=\"ProjectCodeStyleConfiguration\">\n    <state>\n        <option name=\"USE_PER_PROJECT_SETTINGS\" value=\"true"
  },
  {
    "path": ".idea/encodings.xml",
    "chars": 135,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"Encoding\" addBOMForNewFiles=\"with NO BOM"
  },
  {
    "path": ".idea/runConfigurations.xml",
    "chars": 686,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"RunConfigurationProducerService\">\n    <o"
  },
  {
    "path": ".idea/vcs.xml",
    "chars": 167,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping dire"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 4171,
    "preview": "Change Log\n==========\n\nVersion 4.0.0 *(2020-08-27)*\n----------------------------\n\nUpdate:\n- Convert from all Java codes "
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3355,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "LICENSE",
    "chars": 11325,
    "preview": "Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licens"
  },
  {
    "path": "README.md",
    "chars": 8029,
    "preview": "RecyclerView Animators\n======================\n<p align=\"center\">\n  <img src=\"art/logo.jpg\" width=\"80%\">\n</p>\n\n[![Android"
  },
  {
    "path": "animators/build.gradle",
    "chars": 1654,
    "preview": "apply plugin: 'com.android.library'\napply plugin: 'kotlin-android'\n\nandroid {\n  compileSdkVersion COMPILE_SDK_VERSION as"
  },
  {
    "path": "animators/src/androidTest/java/jp/wasabeef/recyclerview/ApplicationTest.java",
    "chars": 348,
    "preview": "package jp.wasabeef.recyclerview;\n\nimport android.app.Application;\nimport android.test.ApplicationTestCase;\n\n/**\n * <a h"
  },
  {
    "path": "animators/src/main/AndroidManifest.xml",
    "chars": 48,
    "preview": "<manifest package=\"jp.wasabeef.recyclerview\" />\n"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/adapters/AlphaInAnimationAdapter.kt",
    "chars": 1199,
    "preview": "package jp.wasabeef.recyclerview.adapters\n\nimport android.animation.Animator\nimport android.animation.ObjectAnimator\nimp"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/adapters/AnimationAdapter.kt",
    "chars": 4258,
    "preview": "package jp.wasabeef.recyclerview.adapters\n\nimport android.animation.Animator\nimport android.view.View\nimport android.vie"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/adapters/ScaleInAnimationAdapter.kt",
    "chars": 1310,
    "preview": "package jp.wasabeef.recyclerview.adapters\n\nimport android.animation.Animator\nimport android.animation.ObjectAnimator\nimp"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/adapters/SlideInBottomAnimationAdapter.kt",
    "chars": 1095,
    "preview": "package jp.wasabeef.recyclerview.adapters\n\nimport android.animation.Animator\nimport android.animation.ObjectAnimator\nimp"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/adapters/SlideInLeftAnimationAdapter.kt",
    "chars": 1094,
    "preview": "package jp.wasabeef.recyclerview.adapters\n\nimport android.animation.Animator\nimport android.animation.ObjectAnimator\nimp"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/adapters/SlideInRightAnimationAdapter.kt",
    "chars": 1094,
    "preview": "package jp.wasabeef.recyclerview.adapters\n\nimport android.animation.Animator\nimport android.animation.ObjectAnimator\nimp"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/BaseItemAnimator.kt",
    "chars": 21387,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.animation.Animator\nimport android.view.animation.DecelerateIn"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/FadeInAnimator.kt",
    "chars": 1600,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/FadeInDownAnimator.kt",
    "chars": 1744,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/FadeInLeftAnimator.kt",
    "chars": 1760,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/FadeInRightAnimator.kt",
    "chars": 1759,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/FadeInUpAnimator.kt",
    "chars": 1740,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/FlipInBottomXAnimator.kt",
    "chars": 1623,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/FlipInLeftYAnimator.kt",
    "chars": 1619,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/FlipInRightYAnimator.kt",
    "chars": 1622,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/FlipInTopXAnimator.kt",
    "chars": 1618,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/LandingAnimator.kt",
    "chars": 1747,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/OvershootInLeftAnimator.kt",
    "chars": 1735,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.OvershootInterpolator\nimport androidx.recycler"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/OvershootInRightAnimator.kt",
    "chars": 1734,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.OvershootInterpolator\nimport androidx.recycler"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/ScaleInAnimator.kt",
    "chars": 1670,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/ScaleInBottomAnimator.kt",
    "chars": 1876,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/ScaleInLeftAnimator.kt",
    "chars": 1814,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/ScaleInRightAnimator.kt",
    "chars": 1873,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/ScaleInTopAnimator.kt",
    "chars": 1813,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/SlideInDownAnimator.kt",
    "chars": 1751,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/SlideInLeftAnimator.kt",
    "chars": 1704,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/SlideInRightAnimator.kt",
    "chars": 1703,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/SlideInUpAnimator.kt",
    "chars": 1747,
    "preview": "package jp.wasabeef.recyclerview.animators\n\nimport android.view.animation.Interpolator\nimport androidx.recyclerview.widg"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/animators/holder/AnimateViewHolder.kt",
    "chars": 481,
    "preview": "package jp.wasabeef.recyclerview.animators.holder\n\nimport android.animation.Animator\nimport androidx.recyclerview.widget"
  },
  {
    "path": "animators/src/main/java/jp/wasabeef/recyclerview/internal/ViewHelper.kt",
    "chars": 1049,
    "preview": "package jp.wasabeef.recyclerview.internal\n\nimport android.view.View\n\n/**\n * Copyright (C) 2021 Daichi Furiya / Wasabeef\n"
  },
  {
    "path": "build.gradle",
    "chars": 626,
    "preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n  ext"
  },
  {
    "path": "example/build.gradle",
    "chars": 953,
    "preview": "apply plugin: 'com.android.application'\napply plugin: 'kotlin-android'\n\nandroid {\n  compileSdkVersion COMPILE_SDK_VERSIO"
  },
  {
    "path": "example/src/main/AndroidManifest.xml",
    "chars": 847,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  xmlns:tool"
  },
  {
    "path": "example/src/main/java/jp/wasabeef/example/recyclerview/AdapterSampleActivity.kt",
    "chars": 3624,
    "preview": "package jp.wasabeef.example.recyclerview\n\nimport android.content.Context\nimport android.os.Bundle\nimport android.view.Vi"
  },
  {
    "path": "example/src/main/java/jp/wasabeef/example/recyclerview/AnimatorSampleActivity.kt",
    "chars": 4366,
    "preview": "package jp.wasabeef.example.recyclerview\n\nimport android.os.Bundle\nimport android.view.View\nimport android.widget.Adapte"
  },
  {
    "path": "example/src/main/java/jp/wasabeef/example/recyclerview/MainActivity.kt",
    "chars": 1087,
    "preview": "package jp.wasabeef.example.recyclerview\n\nimport android.content.Intent\nimport android.os.Bundle\nimport android.view.Vie"
  },
  {
    "path": "example/src/main/java/jp/wasabeef/example/recyclerview/MainAdapter.kt",
    "chars": 1407,
    "preview": "package jp.wasabeef.example.recyclerview\n\nimport android.content.Context\nimport android.view.LayoutInflater\nimport andro"
  },
  {
    "path": "example/src/main/java/jp/wasabeef/example/recyclerview/MyAnimationAdapter.kt",
    "chars": 324,
    "preview": "package jp.wasabeef.example.recyclerview\n\nimport androidx.recyclerview.widget.RecyclerView\nimport jp.wasabeef.recyclervi"
  },
  {
    "path": "example/src/main/java/jp/wasabeef/example/recyclerview/MyAnimator.kt",
    "chars": 343,
    "preview": "package jp.wasabeef.example.recyclerview\n\nimport android.view.animation.Interpolator\nimport androidx.interpolator.view.a"
  },
  {
    "path": "example/src/main/java/jp/wasabeef/example/recyclerview/SampleData.kt",
    "chars": 712,
    "preview": "package jp.wasabeef.example.recyclerview\n\n/**\n * Created by Daichi Furiya / Wasabeef on 2020/08/26.\n */\ninterface Sample"
  },
  {
    "path": "example/src/main/res/layout/activity_adapter_sample.xml",
    "chars": 925,
    "preview": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  android:orientation=\"vertical\"\n  android:layo"
  },
  {
    "path": "example/src/main/res/layout/activity_animator_sample.xml",
    "chars": 1634,
    "preview": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  android:orientation=\"vertical\"\n  android:layo"
  },
  {
    "path": "example/src/main/res/layout/activity_main.xml",
    "chars": 835,
    "preview": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  android:orientation=\"vertical\"\n  android:layo"
  },
  {
    "path": "example/src/main/res/layout/layout_list_item.xml",
    "chars": 663,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  androi"
  },
  {
    "path": "example/src/main/res/values/dimens.xml",
    "chars": 205,
    "preview": "<resources>\n  <!-- Default screen margins, per the Android Design guidelines. -->\n  <dimen name=\"activity_horizontal_mar"
  },
  {
    "path": "example/src/main/res/values/strings.xml",
    "chars": 123,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n  <string name=\"app_name\">RecyclerViewAnimators</string>\n\n</resource"
  },
  {
    "path": "example/src/main/res/values/styles.xml",
    "chars": 310,
    "preview": "<resources>\n\n  <!-- Base application theme. -->\n  <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light\">\n    <!-- Custom"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "chars": 201,
    "preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https://services.gradle.org/distributio"
  },
  {
    "path": "gradle.properties",
    "chars": 1188,
    "preview": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will ov"
  },
  {
    "path": "gradlew",
    "chars": 5766,
    "preview": "#!/usr/bin/env sh\n\n#\n# Copyright 2015 the original author or authors.\n#\n# Licensed under the Apache License, Version 2.0"
  },
  {
    "path": "gradlew.bat",
    "chars": 2763,
    "preview": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (th"
  },
  {
    "path": "settings.gradle",
    "chars": 33,
    "preview": "include ':example', ':animators'\n"
  },
  {
    "path": "signingConfigs/debug.gradle",
    "chars": 449,
    "preview": "signingConfigs {\n  debug {\n    storeFile file(\"debug.keystore\")\n    storePassword \"android\"\n    keyAlias \"androiddebugke"
  }
]

// ... and 2 more files (download for full content)

About this extraction

This page contains the full source code of the wasabeef/recyclerview-animators GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 73 files (144.1 KB), approximately 37.7k tokens, and a symbol index with 2 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!