Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.bmoliveira:NumberPicker:1.2.0'
}
dependencies {
implementation("com.github.bmoliveira:NumberPicker:1.2.0")
}
<dependency>
<groupId>com.github.bmoliveira</groupId>
<artifactId>NumberPicker</artifactId>
<version>1.2.0</version>
</dependency>
libraryDependencies += "com.github.bmoliveira" % "NumberPicker" % "1.2.0"
:dependencies [[com.github.bmoliveira/NumberPicker "1.2.0"]]

Installation
Add the following dependency to your module's build.gradle:
compile 'biz.borealis.numberpicker:NumberPicker:1.0.1'
How to use it
<biz.borealis.numberpicker.NumberPicker
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
XML Attributes
<biz.borealis.numberpicker.NumberPicker
...
xmlns:app="http://schemas.android.com/apk/res-auto"
app:np_min_number="1"
.../>
| Name | Type | Default | |----------|:-------------:|------:| |np_min_number|integer|0| |np_max_number|integer|100| |np_text_size_selected|dimension|48sp| |np_text_size|dimension|36sp| |np_text_color_selected|color|#d6000000| |np_text_color|color|#8a000000| |np_fade_text_color|boolean|true| |np_animate_text_size|boolean|true|
Interface
NumberPicker numberPicker = (NumberPicker) findViewById(R.id.np);
numberPicker.setOnValueChangeListener(new OnValueChangeListener() {
@Override
public void onValueChanged(int newValue) {
}
});