Questions tagged [numberpicker]

A Number Picker is a UI element that lets the user pick a numeric value.

NumberPickers define the input value to be numbers and optionally some other numeric characters, like . or -.

This definition is useful for input sanitation, and it allows mobile devices to show a numeric-only keyboard when the input field is edited.

Examples:

362 questions
8
votes
2 answers

Catch keyboard 'Done' for NumberPicker

I have an AlertDialog with just some text, a NumberPicker, an OK, and a Cancel. package org.dyndns.schep.example; import android.os.Bundler; import android.view.View; import android.widget.NumberPicker; import android.app.Activity; import…
aschepler
  • 70,891
  • 9
  • 107
  • 161
7
votes
0 answers

Change the fling speed for Android's Numberpicker within an Alertdialog

I am using Androids Numberpicker within an alert dialog. However, as the list of values within the numberpicker is large e.g. 0-89 degrees say, I would like the fling gesture to scroll faster through the list of values as currently it is too slow.…
puzii
  • 117
  • 7
7
votes
6 answers

Android Numberpicker default value not coming

When the numberpicker is loaded, the default value is not appearing on the screen until touched. Once touched, everything works fine.Any help appreciated. Also if the formatter is removed, it works fine. dialog.xml
Renjith
  • 3,274
  • 19
  • 39
7
votes
3 answers

Android NumberPicker wraps values when displayed values are changed

I have an android Dialog with a 3 numberpickers inside. Changing the 3rd picker triggers a change in the displayed values of the first 2 pickers. However I've noticed when I change the displayed values, and call setWrapSelectorWheel(false) it…
Prometheus3k
  • 143
  • 2
  • 7
7
votes
2 answers

How to use NumberPicker in Android app with API 7?

The minimum sdk of my app is 7, but I can use DialogFragment which is from sdk version 11, because it is in the support library which is in my lib directory. I'd like to make something like this example:…
6
votes
3 answers

Android Numberpicker decimals

I'm trying to create a numberpicker in Android but the wheel only increase by 1. I want to increase by 0.1. I've looked up on the net but I've found a formated array of floats disabling the wheel. Please help and sorry for the grammar, I'm learning.…
edusandovall
  • 81
  • 1
  • 8
6
votes
1 answer

Texts in NumberPicker are cut off

I have dialog with NumberPicker security questions. The long texts are cut off. How to solve this issue? This is layout's content for dialog
hhs
  • 716
  • 1
  • 6
  • 22
6
votes
2 answers

Set the number of visible items in a NumberPicker

I have a simple NumberPicker just like this: and I was wondering how I can make it show more elements above and below the selected element. For example, in the picture you can see "9" above the selected element "10", and "11" right below it. I…
Mike Laren
  • 8,028
  • 17
  • 51
  • 70
6
votes
2 answers

Android Number Picker get value to textview

I am using an alert dialog with a number picker, but I don't know a easy way to get te number picker value to an textview in the activity when I press the OK button of the alert. Activity java code: public class SecondActivity extends Activity…
user3618526
  • 61
  • 1
  • 1
  • 2
6
votes
1 answer

Android Loading Custom Number Picker Drawable [Image Inside]

On the left is the default Number Picker by android. Is it possible to load a custom number picker like on the right, if I have the drawable images?
Zen
  • 2,698
  • 4
  • 28
  • 41
6
votes
1 answer

Android NumberPicker OnValueChangeListener

I have a question concerning the Android NumberPicker. When the user is performing a Fling on a NumberPicker, for every single step the Listener for OnValueChange is triggered. Can I change this in that way, that the oldVal and the newVal can…
schorschel
  • 81
  • 1
  • 6
6
votes
1 answer

Implementing OnValueChange to a NumberPicker in Android

I"m trying to add the onValueChangeListener to my number picker (np1) in android 4.2.2. Here's what I have so far public class main extends Activity { ViewFlipper vf = null; HttpClient client = null; private ArrayList captionList = new…
TheMcMurder
  • 758
  • 3
  • 9
  • 22
6
votes
1 answer

How to display more than 3 values at a time in a NumberPicker

I'm creating a number picker as indicated in the attached image below but I want to show more than 3 values if space is available. This picker has 20 items and there is plenty of room to show more than 3 values. Can this be accomplished using…
wheels53
  • 719
  • 1
  • 7
  • 21
5
votes
0 answers

NumberPicker - array of String with 2 lines

I have a NumberPicker, where i want to return 2 lines instead of singleline. so far i have tried to use \n and created a custom style for NumberPicker. style.xml