Questions tagged [android-number-picker]

A widget that enables the user to select a number from a predefined range. There are two flavors of this widget and which one is presented to the user depends on the current theme.

A widget that enables the user to select a number from a predefined range. There are two flavors of this widget and which one is presented to the user depends on the current theme.

  • If the current theme is derived from Theme the widget presents the current value as an editable input field with an increment button above and a decrement button below. Long pressing the buttons allows for a quick change of the current value. Tapping on the input field allows to type in a desired value.
  • If the current theme is derived from Theme_Holo or Theme_Holo_Light the widget presents the current value as an editable input field with a lesser value above and a greater value below. Tapping on the lesser or greater value selects it by animating the number axis up or down to make the chosen value current. Flinging up or down allows for multiple increments or decrements of the current value. Long pressing on the lesser and greater values also allows for a quick change of the current value. Tapping on the current value allows to type in a desired value.

Useful links

105 questions
0
votes
4 answers

Incorrect Activity when running App Android Studio

I have starting building an app in Android studio. I have established the MainPage as the launcher activity in the manifest.xml.
0
votes
2 answers

Databinding with NumberPicker

I meet a problem, because I want to databind a numberPicker. But I ca't find any example anywhere , and as usual, it doesn't work at the first try ... neither after a dozen :) . So I would like to question your knowledge. So here is basically what…
0
votes
0 answers

number picker with definition on side

I am creating Dialog box with an number picker, How should I do to have a definition beside of the number picker? Something looks like number picker This is what I had for (without the hours word). This is my code: public void…
Shawn.Y
  • 181
  • 3
  • 14
0
votes
1 answer

NumberPicker, OnValueChangedListener, distinguish change from user and from programmatic change?

It seems that OnValueChangedListener is called when the value is changed programmatically by the app itself. Can I make it raised only when the user rotates the dial or know whether the event is from the app (code) or from the user?
Damn Vegetables
  • 11,484
  • 13
  • 80
  • 135
0
votes
1 answer

Send number from NumberPicker to Firebase

Is there a way to send Number from NumberPicker to Firebase? I have connected a NumberPicker library from GITHUB. But I want when select number to send to Firebase, is there a way ? I tried with this code : String number =…
0
votes
1 answer

Using NumberPicker in android but with strings from SQlite

Is it possible to create something like a NumberPicker Widget in android but populate it with a series of strings pulled from an SQLite database? If there's only one entry, then the spinner would have one string, if there is a hundred, then there…
Diesel
  • 519
  • 1
  • 6
  • 24
0
votes
0 answers

changing the color of number picker items

How to change the color of number picker items(numbers, texts)? I tried changing color with styles.xml file but it didn't work styles.xml :
shwetag21
  • 33
  • 6
0
votes
1 answer

Range NumberPicker

I saw Numberpicker as a tool to select a number from a range with minimum value of 0. I am looking for a range picker view to be able to select a range of values (instead of a value from a range) including negative values (for example (-100,…
Stack crawler
  • 369
  • 1
  • 4
  • 20
0
votes
1 answer

concatenate numbers to string getting from different number pickers and showing them in a textView

I have a text view, by clicking TextView I have a dialog with 3 NumberPickers. I want to concatenate values to string which will looks like '99 9 99' or '99999'[selected integers from NumberPickers] from all 3 different NumberPickers shown in…
Kartik.S
  • 73
  • 10
0
votes
1 answer

Get value from numberpicker and putting it in a textview

// i need to get newVal out of all these numberpickers methods separately , and i set them in to textviews , but when try to get value from the text view app crash.can you help me . how can i get numberpicker value outside it's onValuechange…
0
votes
1 answer

Android: How to set max to min values of numberpicker with offset of 10

I want to have number picker with values 10,20,30,40,50 when I'm doing like this: minutePicker.setMaxValue(10); minutePicker.setMinValue(1); minutePicker.setDisplayedValues(values); provided values is {"30", "40", "50", "60", "70"}; Im…
blackHawk
  • 6,047
  • 13
  • 57
  • 100
0
votes
2 answers

Debugging: How to see returned value of function

I have this class and I want to see what is the current value of view.getValue() when I scroll the number picker, I put a breakpoint inside if but I'm unable to see its value public class ClsCallbackBottomSheet implements…
blackHawk
  • 6,047
  • 13
  • 57
  • 100
0
votes
1 answer

set number picker am pm value dynamically

I am working on custom number picker for displaying AM and PM values.Please check the below code for number picker.
malli
  • 642
  • 2
  • 12
  • 30
0
votes
1 answer

Reduce only up/down number size in NumberPicker

I want reduce size of up/down numbers (marked with arrow), keeping middle number size bigger.
0
votes
3 answers

setMinValue on NumberPicker doesn't select the correct min value

I want to create a NumberPicker with an array of displayed values. The values are not supposed to change when the NumberPicker is displayed, but the min and max values change dynamically depending on user action. Here is the code:
Eselfar
  • 3,759
  • 3
  • 23
  • 43