ExpandableRecyclerView - Expandable RecyclerView For Kotlin

Overview

Expandable RecyclerView

ExpandableItemView in ScrollView:

materialdots

ExpandableRecyclerView

materialdots

Installation

(app) build.gradle:

implementation 'com.github.emircanpekyurek:ExpandableRecyclerView:1.0.1'

AND

(root) build.gradle:

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

or settings.gradle:

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

Usage

for collapsed attributes: materialdots

expanded attributes: materialdots

for horizontal: materialdots

Usage For ExpandableRecyclerView

Create a layout xml file with only ExpandableItemView in it. eg:custom_expandable_recycler_view

/>">
xml version="1.0" encoding="utf-8"?>
<com.emircan.expandablerecyclerview.ExpandableItemView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:animation_duration="200"
    app:collapsed_icon_tint="#787878"
    app:expanded_icon_tint="#000000"
    app:line_color="#D6D6D6"
    app:recycler_layout_manager="GridLayoutManager"
    app:recycler_padding="5dp"
    app:recycler_span_count="3"
    app:show_view_line="true"
    app:title="Custom Grid View"
    app:title_color="#000000" />
 />

add ExpandableRecyclerView to activity or fragment:

">
<com.emircan.expandablerecyclerview.ExpandableRecyclerView
    android:id="@+id/expandableRecyclerView"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

use setData function:

val adapter = ... //RecyclerView adapter
val list = listOf<ExpandableItem>(ExpandableItem("Item 1", adapter))
val singleExpandItem = true //for single expandable
expandableRecyclerView.setData(R.layout.custom_expandable_recycler_view, list, singleExpandItem)

Custom Attributes:

Attribute Description
expanded_icon expanded icon
expanded_icon_tint expanded icon color
collapsed_icon collapsed icon
collapsed_icon_tint collapsed icon color
show_view_line show line when collapsed
line_color line color
title title text
title_color title color
android:textSize title text size
animation_duration animation time of expand and collapse
recycler_padding expanded recycler padding
android:orientation horizontal or vertical for LinearLayoutManager
recycler_span_count spanCount for Grid
recycler_layout_manager LinearLayoutManager, GridLayoutManager or StaggeredGridLayoutManager
You might also like...
Starter code for Android Kotlin Fundamentals Codelab 7.1 RecyclerView Fundamentals

TrackMySleepQuality with RecyclerView - Starter Code for 7.1 Starter code for Android Kotlin Fundamentals Codelab 7.1 RecyclerView Fundamentals Introd

RecyclerView Application example using kotlin and viewbinding.

SimpleRecyclerViewApp Shows how to display some items in a simple list using the RecyclerView and RecycleView.Adapter. The RecycleView is the entity t

how to handle recyclerView in Kotlin to display grid , vertical , horizontal layouts

Dogglers - Starter Code Starter code for the second independent project for Android Basics in Kotlin. Introduction This is the starter code for the Do

This project is a simple recyclerview example coded in kotlin language.
This project is a simple recyclerview example coded in kotlin language.

EXPENSIVE CARS 🚗 This project is a simple recyclerview example coded in kotlin language. My purpose in writing this project is to practice the recycl

An Android Animation library which easily add itemanimator to RecyclerView items.
An Android Animation library which easily add itemanimator to RecyclerView items.

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

A RecyclerView(advanced and flexible version of ListView in Android) with refreshing,loading more,animation and many other features.
A RecyclerView(advanced and flexible version of ListView in Android) with refreshing,loading more,animation and many other features.

UltimateRecyclerView Master branch: Dev branch: Project website:https://github.com/cymcsg/UltimateRecyclerView Description UltimateRecyclerView is a R

[] RecyclerView made simple
[] RecyclerView made simple

TwoWayView RecyclerView made simple. Features A LayoutManager base class that greatly simplifies the development of custom layouts for RecyclerView A

RecyclerView extension library which provides advanced features. (ex. Google's Inbox app like swiping, Play Music app like drag and drop sorting)
RecyclerView extension library which provides advanced features. (ex. Google's Inbox app like swiping, Play Music app like drag and drop sorting)

Advanced RecyclerView This RecyclerView extension library provides Google's Inbox app like swiping, Play Music app like drag-and-drop sorting and expa

[UNMAINTAINED] Sticky Headers decorator for Android's RecyclerView
[UNMAINTAINED] Sticky Headers decorator for Android's RecyclerView

This project is no longer being maintained sticky-headers-recyclerview This decorator allows you to easily create section headers for RecyclerViews us

Releases(1.0.6)
Owner
null
ANDROID. ChipsLayoutManager (SpanLayoutManager, FlowLayoutManager). A custom layout manager for RecyclerView which mimicric TextView span behaviour, flow layouts behaviour with support of amazing recyclerView features

ChipsLayoutManager This is ChipsLayoutManager - custom Recycler View's LayoutManager which moves item to the next line when no space left on the curre

Oleg Beloy 3.2k Dec 25, 2022
A RecyclerView that implements pullrefresh and loadingmore featrues.you can use it like a standard RecyclerView

XRecyclerView a RecyclerView that implements pullrefresh , loadingmore and header featrues.you can use it like a standard RecyclerView. you don't need

XRecyclerView 5.3k Dec 26, 2022
Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager.

Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager.

Jack and phantom 504 Dec 25, 2022
RecyclerView : SleepQualityTracker with RecyclerView app

RecyclerView - SleepQualityTracker with RecyclerView app SleepQualityTracker with RecyclerView This app builds on the SleepQualityTracker developed pr

Kevin 2 May 14, 2022
TikTok-RecyclerView - This is a demo app built using 'Koin' a new dependency injection framework for Android along with RecyclerView and ExoPlayer2.

TikTok-RecyclerView Demo About This is a demo app built using 'Koin' a new dependency injection framework for Android along with RecyclerView and ExoP

Baljeet Singh 19 Dec 28, 2022
Pagination-RecyclerView - Simple and easy way to Paginating a RecyclerView

Pagination-RecyclerView Simple and easy way to Paginating a RecyclerView Android

Rakshit Nawani 0 Jan 3, 2022
kotlin dsl for kids to simplify RecyclerView.Adapter logic

KidAdapter RecyclerView adapter for kids. A kotlin dsl mechanism to simplify and reduce boilerplate logic of a RecyclerView.Adapter. With KidAdapter y

Eugeniu Tufar 56 Nov 27, 2022
Elegant design and convenient to use RecyclerView adapter library based on Kotlin DSL.

xAdapter: Kotlin DSL 风格的 Adapter 封装 1、简介 该项目是 KotlinDSL 风格的 Adapter 框架封装,用来简化 Adapter 调用,思想是采用工厂和构建者方式获取 Adapter 避免代码中定义大量的 Adapter 类。该项目在 BRVAH 的 Ada

ShouHeng 17 Oct 9, 2022
RecyclerView Template With Kotlin

RecyclerViewTemplate-Kotlin How To Create Recycler Adapter Template In Android Studio > . RecyclerView makes it easy to efficiently display large sets

mohamed tamer 1 Nov 11, 2022