NumberPicker alternatives and similar packages
Based on the "Progressbar/Progress View Widget" category.
Alternatively, view NumberPicker alternatives based on common mentions on social networks and blogs.
-
SmoothProgressBar
A small Android library allowing you to have a smooth and customizable horizontal or circular indeterminate ProgressBar -
LoadingDrawable
Some beautiful android loading drawable, can be combined with any view as the LoadingView or the ProgressBar. Besides, some Drawable can customize the loading progress too. -
ProgressWheel
A progress wheel for android, intended for use instead of the standard progress bar. -
Android-RoundCornerProgressBar
[Android] Round Corner Progress Bar Library for Android -
KProgressHUD
An implement of ProgressHUD for Android, similar to MBProgressHUD, SVProgressHUD for iOS. -
AndroidFillableLoaders
Completely customizable progress based loaders drawn using custom CGPaths written in Swift -
android-square-progressbar
An android library to display a progressbar that goes around an image. -
GoogleProgressBar
Android library to display progress like google does in some of his services. -
ArcProgressStackView
Present your progress bars in arc mode with information and total control. -
android-HoloCircularProgressBar
Holo Circular ProgressBar -
CircleProgressBar
A circular android ProgressBar library which extends View, and the usage same as ProgressBar, It has solid,line and solid_line three styles. Besides, progress value can be freely customized. -
AnimatedCircleLoadingView
An animated circle loading view -
MaterialLoadingProgressBar
MaterialLoadingProgressBar provide a styled ProgressBar which looks like SwipeRefreshLayout's loading indicator(support-v4 v21+) -
DownloadProgressBar
DownloadProgressBar is an android library that delivers awesome custom progress bar. You can manipulate it's state in every way. -
ColorArcProgressBar
This is beautiful color arc progress bar. -
Loading Progress
A highly configurable library to do loading progress with animated balls -
RefreshActionItem
Android - An action bar item which acts both as a refresh button and as a progress indicator -
Dilating Dots Progress Bar
A customizable indeterminate progress bar -
InfiniteIndicator
This lib can be used for viewpager infinite loop with indicator easily. -
ProgressPieView
Android library for showing progress in a highly customizable pie. -
ColoringLoading
This project provide Coloring Loading View for Android. And this project is not using the image file! -
WheelIndicatorView
A 'Google Fit' like activity indicator for Android -
Percentage Chart View
An Android percentage chart that displays the progress of any single given task or information. -
State Views for Android
Create & Show progress, data or error views, the easy way! -
MaskProgressView
Yet another android custom progress view for your music player -
circular-slider-android
Circular Slider UI Control for Android -
ACProgressLite
Android loading or progress dialog widget library, provide efficient way to implement iOS like loading dialog and progress wheel -
MultiProgressBar
Open source android library for different progress bar designs -
SlidingSquaresLoader
A simple progress loader inspired by Can you Code this UI? Volume 6! - https://stories.uplabs.com/can-you-code-this-ui-volume-6-7bd09fa6dd92#.nyh2zhpvb -
DelayedProgress
ProgressDialog that waits a minimum time to be dismissed before showing. Once visible, the ProgressDialog will be visible for a minimum amount of time to avoid "flashes" in the UI. -
TinglingSquares
⏳ A delightful progress animation that you'll fall in ❤️️ with, very easily. -
StackedHorizontalProgressBar
:barber: [Android Library] Stacked dual progress indicator progress-bar -
CoolProgressViews
Android library with collection of cool progress views. -
ArcPointer
Arc pointer - simple customized progress bar in the form of an arch -
MusicBar
view visualize progress bar for sound file like sound cloud -
FillProgressLayout
A simple and flexible Fillable Progress Layout written in Kotlin -
ProgressRingView
A simple lib to create a ring-like progress view with corner edges -
N-SidedProgressBar
Progress Bar in the shape of regular polygon. -
ProgressDialog Library
A ProgressDialog Library for Android API 24+ apps provided by Techiness Overloaded (Developer name : Arunprasadh C). Quite Useful for showing progress during any operation. Has support for both Determinate and Indeterminate ProgressBar, Dark Theme, and NegativeButton.
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of NumberPicker or a related project?
README
NumberPicker
A simple customizable NumberPicker for Android.
Installation
via Gradle:
compile 'com.github.travijuu:numberpicker:1.0.7'
or Maven:
<dependency>
<groupId>com.github.travijuu</groupId>
<artifactId>numberpicker</artifactId>
<version>1.0.7</version>
<type>aar</type>
</dependency>
Usage
Add NumberPicker component in your XML layout
activity_main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
xmlns:numberpicker="http://schemas.android.com/apk/res-auto"
tools:context="com.travijuu.numberpicker.sample.MainActivity">
<com.travijuu.numberpicker.library.NumberPicker
android:id="@+id/number_picker"
android:layout_width="130dp"
android:layout_height="40dp"
numberpicker:min="0"
numberpicker:max="10"
numberpicker:value="-5"
numberpicker:unit="1"
numberpicker:focusable="false"
numberpicker:custom_layout="@layout/number_picker_custom_layout" />
</LinearLayout>
MainActivity.java
import com.travijuu.numberpicker.library.NumberPicker;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
NumberPicker numberPicker = (NumberPicker) findViewById(R.id.number_picker);
numberPicker.setMax(15);
numberPicker.setMin(5);
numberPicker.setUnit(2);
numberPicker.setValue(10);
}
}
XML Attributes
Name | Type | Default |
---|---|---|
min | int | 0 |
max | int | 999999 |
value | int | 1 |
unit | int | 1 |
focusable | boolean | false |
custom_layout | layout | @layout/number_picker_layout |
Layout Customization
if you want to customize your NumberPicker layout you can create your own.
IMPORTANT! This layout should contains at least 3 items with given Ids:
- Button (@+id/increment)
- Button (@+id/decrement)
- TextView (@+id/display)
Note: You can see an example layout in both sample and library modules.
Example XML layout:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="130dp"
android:layout_height="40dp"
android:orientation="horizontal"
android:background="@android:color/white">
<Button
android:layout_width="30dp"
android:layout_height="match_parent"
android:padding="0dp"
android:textColor="@android:color/black"
android:background="@null"
android:id="@+id/decrement"
android:textStyle="bold"
android:text="—"/>
<TextView
android:layout_width="70dp"
android:background="@android:color/white"
android:layout_height="match_parent"
android:text="1"
android:textColor="@android:color/black"
android:inputType="number"
android:id="@+id/display"
android:gravity="center"
/>
<Button
android:layout_width="30dp"
android:layout_height="match_parent"
android:padding="0dp"
android:textSize="25sp"
android:textColor="@android:color/black"
android:background="@null"
android:id="@+id/increment"
android:text="+"/>
</LinearLayout>
Methods
Here is the list of methods with definitions.
setMin(int value)
Sets minimum value allowed
getMin()
Gets minimum value
setMax(int value)
Sets maximum value allowed
getMax()
Gets maximum value allowed
setUnit(int value)
Sets unit value for increment/decrement operation
getUnit()
Gets unit value
setValue(int value)
Sets NumberPicker current value
getValue()
Gets NumberPicker current value
setActionEnabled(ActionEnum action, boolean enabled)
Enables or disables Increment/Decrement buttons
setDisplayFocusable(boolean focusable)
Enables or disables NumberPicker editable via keyboard
increment()
NumberPicker will be incremented by defined
unit value
increment(int unit)
NumberPicker will be incremented by given
unit value
decrement()
NumberPicker will be decremented by defined
unit vale
decrement(int unit)
NumberPicker will be decremented by given
unit value
refresh()
NumberPicker will be refreshed with already defined value
clearFocus()
NumberPicker will lose the focus
valueIsAllowed(int value)
Checks whether given value is acceptable or not
setLimitExceededListener(LimitExceededListener limitExceededListener)
setValueChangedListener(ValueChangedListener valueChangedListener)
setOnEditorActionListener(OnEditorActionListener onEditorActionListener)
setOnFocusChangeListener(OnFocusChangeListener onFocusChangeListener)
Listeners
LimitExceededListener
This is triggered when you try to set lower or higher than the given min/max limits
public class DefaultLimitExceededListener implements LimitExceededListener {
public void limitExceeded(int limit, int exceededValue) {
String message = String.format("NumberPicker cannot set to %d because the limit is %d.", exceededValue, limit);
Log.v(this.getClass().getSimpleName(), message);
}
}
ValueChangedListener
This is triggered when the NumberPicker is incremented or decremented.
Note: setValue
method will not trigger this listener.
public class DefaultValueChangedListener implements ValueChangedListener {
public void valueChanged(int value, ActionEnum action) {
String actionText = action == ActionEnum.MANUAL ? "manually set" : (action == ActionEnum.INCREMENT ? "incremented" : "decremented");
String message = String.format("NumberPicker is %s to %d", actionText, value);
Log.v(this.getClass().getSimpleName(), message);
}
}
OnEditorActionListener
This is triggered when you click "done" button on keyboard after you edit current value.
Note: "done" button can be changed on xml so this listener should be overrided according to new IME option.
OnFocusChangeListener
This is triggered when clearFocus()
is called which helps to set new value when the focus lost