NumberPickerView
Custom Android View to provide a user friendly way of picking numbers.
Features
- Set an allowed range for users to pick.
- Provide gestures such as scrolling and long press for a better UX.
- Give haptic feedback on gestures.
- More stuff I'm planning for the future..
📅
Sample app
- You can download and try out the sample app yourself too!
Usage
Dependency
- See releases to manually download AAR
For Gradle, in your project level build.gradle file:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
And then add the library in your module build.gradle:
dependencies {
implementation 'com.github.Re1r0:NumberPickerView:v1.0.1'
}
Add the view to your layout
Listen for changes
numberPickerView.setOnNumberChangedListener(object : OnNumberChangedListener {
override fun onChanged(newNumber: Int) {
Log.e("NumberPickerView", "New number: $newNumber")
}
})