Skip to content

Android library that helps developers choose the hour and minute intervals from customized dialog which is not possible with MaterialTimePicker.

Notifications You must be signed in to change notification settings

mirzemehdi/timeintervalpicker

Repository files navigation

TimeIntervalPicker

TimeIntervalPicker is a library that helps developers choose the hour and minute intervals from customized dialog which is not possible with MaterialTimePicker.

screenshot" "

How to add to your project

First, add the JitPack repository to your project gradle file.

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

Then, add library to your build.gradle (app module).

implementation 'com.github.mirzemehdi:timeintervalpicker:1.0.0'

Usage

You can customize shown properties in the sample.

val timeIntervalPicker = TimeIntervalPicker.Builder()
            .setTitleText("Time Interval Picker")
            .setIntervalBetweenHours(1)
            .setIntervalBetweenMinutes(5)
            .setHour(3)
            .setMinute(10)
            .setHourListCircular(true)
            .setMinuteListCircular(true)
            .build()

timeIntervalPicker.addOnPositiveButtonClickListener {
  Log.d("TimePickerValues",
            "hour:${timeIntervalPicker.hour}, " +
            "minute:${timeIntervalPicker.minute}, " +
            "timeStamp:${timeIntervalPicker.timeStampInMillis} "
       )
}

//Show dialog
timeIntervalPicker.show(supportFragmentManager, "TimeIntervalPicker")
       

About

Android library that helps developers choose the hour and minute intervals from customized dialog which is not possible with MaterialTimePicker.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages