Git Product home page Git Product logo

expandablerecyclerview's Introduction

ExpandableRecyclerView

中文README

Design Sketch

Features:

  • Expand and close animations smoothly
  • Supports expanding only one Group
  • Support to expand and close all
  • Supports multiple types of items
  • Supports LinearLayoutManager and GridLayoutManager
  • Support sticky header
  • Expanded state saving and recovery (when switching between portrait and horizontal screens)
  • Support for Java project integration (>= v0.6.0)

Take a look

Download Url https://github.com/pokercc/ExpandableRecyclerView/releases

How to use:

  1. include dependence

Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

last_version =

implementation("com.github.pokercc:ExpandableRecyclerView:${last_version}")
  1. Write code
  • Use ExpandableRecyclerView in your layout xml.
  • Inheriting ExpandableAdapter to realize your adapter.

More detail please refer demo

Attention:

  • Using StickyHeader,GroupViewHolder.itemView please set an opaque background, otherwise penetration will occur
  • ExpandableRecyclerView's height must set to match_parent or fixed size, Otherwise, the RecyclerView height may change during expansion and closure, causing problems for the execution of the animation

Design from: https://dribbble.com/shots/3253927-Accordion

Welcome to star or create issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.