Skip to content
D
Devendra.
Carousel RecyclerView

Carousel RecyclerView

2024

Interactive carousel layout manager for Android lists

01

Overview

An interactive horizontal carousel implementation for Android RecyclerViews. It features dynamic scale scaling, page snapping, auto-scrolling with play/pause functionality, indicator dots, and smooth transitions.

02

Problem

Standard horizontal RecyclerViews lack native visual focus for active items, requiring custom mathematical calculations during scroll to scale items, snap them to the center, and synchronize indicator positions.

03

Solution

Implemented a custom LayoutManager and scroll listener that computes offset distances from the center and applies dynamic scale and alpha transformations to items in real-time. Added snap helper integration for alignment.

04

Impact

Enables a highly engaging and interactive user experience for banner sliders and media cards, optimizing performance to maintain 60 FPS.

Project Info

Company

GitHub Open Source

Role

Creator & Maintainer

Duration

2024

Platform

Native Android

Language

Kotlin

Technologies Used

KotlinRecyclerViewPagerSnapHelperViewBindingValueAnimator

Role & Scope

Responsibilities

  • Created custom scroll listener scaling computations
  • Integrated SnapHelper and dot indicators
  • Optimized drawing performance during scaling

Key Highlights

  • Smooth dynamic item scaling and fading
  • Snapping behavior for center focus
  • Automated play/pause slideshow support
  • Interactive indicator page sync