Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Every file in the repo — @DevTarun376 must review all PRs into main
* @DevTarun376
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI

on:
push:
branches:
- main
- development
pull_request:
branches:
- main
- development

jobs:
build-library:
name: Build Library
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build library release AAR
run: ./gradlew :recyclerview-multitype-view:assembleRelease --no-daemon

- name: Upload AAR
uses: actions/upload-artifact@v4
with:
name: library-aar
path: recyclerview-multitype-view/build/outputs/aar/recyclerview-multitype-view-release.aar
retention-days: 7

build-demo:
name: Build Demo App
runs-on: ubuntu-latest
needs: build-library

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build demo app debug APK
run: ./gradlew :app:assembleDebug --no-daemon

- name: Upload debug APK
uses: actions/upload-artifact@v4
with:
name: demo-apk
path: app/build/outputs/apk/debug/app-debug.apk
retention-days: 7
63 changes: 56 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
# MultiTypeView
# MultiTypeView — Android RecyclerView Multi-Type Adapter Library

A RecyclerView library for displaying grouped, multi-type lists with images, videos, and documents. Supports expand/collapse sections, pagination, delete mode with confirmation, and full visual theming.
**A Kotlin Android library for building grouped, multi-type RecyclerView lists with images, videos, and documents.** Supports expand/collapse sections, infinite scroll pagination, delete mode with confirmation, and full visual theming — with zero ANR and zero OOM on 1000+ item lists.

---
[![JitPack](https://jitpack.io/v/DevTarun376/RV-MultiType-View-Tarun.svg)](https://jitpack.io/#DevTarun376/RV-MultiType-View-Tarun)
[![Min SDK](https://img.shields.io/badge/minSdk-29-brightgreen)](https://developer.android.com/about/versions/10)
[![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)

### Features
- **Multi-type ViewHolders** — Label, Header, Section, and Grid rows with dedicated recycling per type
- **Paginated loading** — only visible items stay in memory; next page loads automatically on scroll
- **Expand / collapse sections** — animated, without resetting the paginator
- **Delete mode** — long-press to enter, checkbox selection, DiffUtil-animated removal
- **Full theming** — colors, icons, backgrounds via `MultiTypeTheme`
- **Glide image loading** — images and video thumbnails loaded off the main thread
- **Tablet-aware grid** — configurable column count for phones and tablets

<!-- DEMO VIDEO — replace the line below with your screen recording -->
<!-- Example: ![Demo](assets/demo.gif) or paste the GitHub-uploaded MP4 URL -->
---

<img width="216" height="480" alt="gif" src="https://github.com/user-attachments/assets/f2678b72-9fcd-47af-8307-9143cc7d90b4" />
<img width="216" height="480" alt="MultiTypeView Android RecyclerView demo showing grouped media list with expand/collapse sections, images and videos in a grid layout" src="https://github.com/user-attachments/assets/f2678b72-9fcd-47af-8307-9143cc7d90b4" />

---

Expand All @@ -29,7 +39,7 @@ dependencyResolutionManagement {

```kotlin
dependencies {
implementation("com.github.DevTarun376:RV-MultiType-View-Tarun:1.0.0")
implementation("com.github.DevTarun376:RV-MultiType-View-Tarun:1.1.0")
}
```

Expand Down Expand Up @@ -565,3 +575,42 @@ The adapter maps `type` integers to ViewHolder classes. To add a custom row (e.g
| Row heading text | `MultiTypeItem.label` on LABEL / SECTION_A / SECTION_B items |
| New row types | Subclass `MultiTypeAdapter` |
| Callbacks / navigation | `MultiTypeAdapterCallback` implementation |

---

## Requirements

| Requirement | Minimum |
|---|---|
| Android SDK | API 29 (Android 10) |
| Kotlin | 1.8+ |
| RecyclerView | 1.3+ |
| Glide | 4.x |

---

## License

```
MIT License

Copyright (c) 2026 Tarun Kumar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
7 changes: 5 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ android {
applicationId = "com.example.rv_multitype_view"
minSdk = 29
targetSdk = 37
versionCode = 1
versionName = "1.0"
versionCode = 2
versionName = "1.1.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
signingConfig = signingConfigs.getByName("debug")
// Demo app — keep classes readable for contributors inspecting the APK.
optimization {
enable = false
Expand Down Expand Up @@ -45,4 +46,6 @@ dependencies {
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(libs.androidx.junit)

// implementation("com.github.DevTarun376:RV-MultiType-View-Tarun:1.0.0")
}
2 changes: 1 addition & 1 deletion recyclerview-multitype-view/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ afterEvaluate {
from(components["release"])
groupId = "com.github.DevTarun376"
artifactId = "recyclerview-multitype-view"
version = "1.0.0"
version = "1.1.0"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}

Expand Down
Loading