Time Span Selector icon
๐Ÿ“ฆ Android SDK Open Source

Time Span Selector

Radial & Linear Duration Picker

A highly customizable, elegant Android library for selecting time durations with Radial and Linear designs.

Android LibraryMaterial 3Custom ViewRadial SelectorTime RangeKotlin

๐Ÿ–ผ๏ธ Visual Showcase & Highlights

Time Span Selector visual preview
Time Span Selector visual preview

A highly customizable, elegant Android library for selecting time durations. Featuring both Circular (Radial) and Linear designs with full Material 3 support.

Library Features

Dual Layouts
๐Ÿ•’ Dual Layouts

Includes both Circular (clock-like) and Linear (slider-like) selectors to fit any application design or UX requirement.

Overnight Support
๐ŸŒ“ Overnight Support

Seamlessly handles spans that cross midnight. Perfect for sleep trackers, work shifts, and flexible alarm settings.

๐Ÿš€ Implementation Guide

Step 1: Add Dependency

Add JitPack repository to build file and include implementation line in app-level build.gradle.

Step 2: Declare in XML

Add CircularTimeSpanSelector or LinearTimeSpanSelector to layout file with desired attributes.

Step 3: Style with Attributes

Use app:tss_spanColor, app:tss_trackWidth, and app:tss_is24HourFormat to customize appearance.

Step 4: Handle Listeners

Implement OnSpanChangeListener in Activity or Fragment for real-time interaction updates.

๐Ÿ“ฆ Library Installation & Setup

1. Add JitPack Repository

Add JitPack to your settings.gradle.kts or root build.gradle file:

dependencyResolutionManagement {
    repositories {
        mavenCentral()
        maven { url = uri("https://jitpack.io") }
    }
}

2. Add Gradle Dependency

Add the dependency to your app-level build.gradle.kts:

dependencies {
    implementation("com.github.ervivekumrao:TimeSpanSelectorView:0.0.6")
}