Questions tagged [numberpicker]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

Espresso test NumberPicker

I'm using a numberPicker on my Android app, and I want to make some E2E tests to check it. I made a customView that holds the NumberPicker that looks like this: <?xml version="1.0" ...
Navalex's user avatar
  • 264
0 votes
0 answers
28 views

Can NumberPicker in Android platform be customized to handle digitals individually?

I'm having someone create an Android app for me, for programming a circuit board that I have. It's a pretty complicated way to program the board as an initial effort, but it is how I want to do it. ...
Andrew's user avatar
  • 33
0 votes
0 answers
30 views

NumberPicker showing wrong values with custom text when `value=1`

I'm trying to make NumberPicker show a custom set of selections and to start with the second item in the list (value=1). The selections are: C♭, C, C#, D♭, and D, and the picker should show "C&...
RhetoricalRuvim's user avatar
0 votes
1 answer
48 views

NumberPicker does not reset as you'd expect when scrolling to it's max value

I am making a score tracker in Xamarin.Android (not Forms) and am running into a problem with the NumberPicker. I tried searching for an answer, but I haven't been able to find anything like my ...
ChibiPhoenix's user avatar
0 votes
0 answers
37 views

Android Number Picker with positions 1, 2 & 3 only settling on 1 or 3 and unexpectedly skipping over 2

I am using a number picker that I control from software to range from only 1 number to any larger number of positions. It works as expected for all numbers of positions except for 3. When I set it ...
st2000's user avatar
  • 276
0 votes
1 answer
61 views

Android Group multiple number pickers together

I would like to group number pickers together so they would form a number with this I was able to make it look like this XML: <?xml version="1.0" encoding="utf-8"?> &...
LaCalienta's user avatar
0 votes
0 answers
32 views

want to scroll number picket automatically

I have a number picker in my java class and i want to scroll on a button click not manually but just on button click and it will scroll to 10-20 points up down. strt.setOnClickListener(new View....
Kumil Kumar's user avatar
0 votes
0 answers
52 views

How can I make the sum of 3 number picker 100?

I want to make an application with 3 number pickers. I want to find the percentage distribution of carbohydrates, fat and protein. and this 3 number picker works in coordination with each other and I ...
NOTR's user avatar
  • 1
1 vote
1 answer
498 views

how to select text color of numberpicker in flutter

I'm working on an application and I wanted to use the numberpicker package for flutter. But the default color for the number picker is blue, and I want to change it, how can I do that? Is there any ...
bora399's user avatar
  • 29
1 vote
1 answer
109 views

NumberPicker's onClick listener takes multiple clicks to recognise

I want to make sure that user clicks on the value in the number picker, and once done, I take an action. I've written the code below. The numberPicker is created in a bottomSheetDialogFragment. ...
Kraken's user avatar
  • 23.7k
0 votes
0 answers
84 views

Android numberPicker to countdownTimer

I want to get numPicker's value to countdowntimer button to start and cancel but it doesn't work. public class TimeManager extends AppCompatActivity { private NumberPicker np1 = null; private ...
Su Mi's user avatar
  • 1
1 vote
1 answer
128 views

CountDownTimer and textView - not displaying time correctly

CountDownTimer and textView - not displaying time correctly. Hello! When you press the start button, the timer will return. But when you press the same button to pause, it is the pointer in the ...
Alex Kremizon's user avatar
0 votes
1 answer
815 views

I'm trying to use the Android NumberPicker widget, but I can't figure out how to set a value from the NumberPicker

I'm a total noob to Kotlin and programming in general, and I want to make an app. In the app involves a NumberPicker widget. I think I got the NP set up properly, as it works when I test it, but I ...
Henri Hawk's user avatar
12 votes
4 answers
12k views

Android Jetpack Compose NumberPicker Widget Equivalent

What is the recommended solution for creating a NumberPicker Widget in Jetpack Compose? Similar to the image below. I am able to create an NumberPicker using an AndroidView within my composable but ...
Charles Woodson's user avatar
0 votes
1 answer
561 views

Flutter, make number picker with numbers fontSize progressively smaller

friends! I want to make a number picker on Flutter, where the font size of numbers (not selected) progressively decreases to each side and changes the colors. As shown in the picture. Is anybody has ...
Nurbek Batyrzhan uulu's user avatar
-1 votes
1 answer
883 views

How To Create Number Picker as a alert dialog in flutter?

I am developing e com application, when user click on quantity label want to show dialog box for select how many quantity he want to buy. I tried to wrap number picker inside Alert dialog. It show ...
Sampath Dissanayake's user avatar
1 vote
0 answers
49 views

NumberPicker Restrictions on non-SDK interfaces

I'm trying to create a custom NumberPicker like this. Class<?> numberPickerClass = null; try { numberPickerClass = Class.forName("android.widget.NumberPicker"); ...
Sherly's user avatar
  • 91
4 votes
1 answer
287 views

Android NumberPicker rendering scrollbars when loading view

I am building a small app that uses NumberPickers. Everything is working as expected except that when navigating to the fragment that contains the pickers it shows small scrollbars the top right ...
Myshkin's user avatar
  • 96
2 votes
0 answers
113 views

NumberPicker change color of one item

I'm trying to make a custom NumberPicker with String. The first String is "select..." and i want to make it a bit transparent to show this is not a real choice. I tried to do things like val ...
Marine Droit's user avatar
0 votes
1 answer
252 views

I have a reset button for reset display timer and value of number picker but it's not reset the vaule of number picker. How can I fix it?

Widget hourPicker() { return Column( children: <Widget>[ Padding( padding: EdgeInsets.only(bottom: 5.0), child: Text( "HH", style: TextStyle(fontSize: ...
warinthornwr's user avatar
2 votes
1 answer
1k views

Flutter number picker doesn't update on bottom sheet

I want to use Flutter number picker inside of bottom sheet dialog. But the number picker doesn't update when I change the value by swiping. My code is below: GestureDetector( ...
idrisyagci's user avatar
2 votes
2 answers
770 views

Changing NumberPicker divider color not working with Android Api 29+

I am using below code to change NumberPicker divider color, this code not working with Android Api 29+ because UnsupportedAppUsage mSelectionDivider. private static void setDividerColor(NumberPicker ...
Hamid Haqparast's user avatar
0 votes
1 answer
1k views

ShawnLin numberpicker library for Android - how to make the text vertically aligned?

I'm using Numberpicker library for Android by Shawn Lin. It's link on Github is: https://github.com/ShawnLin013/NumberPicker The numbers in this widget appear as: As you can see, the numbers are not ...
Sparsh Dutta's user avatar
  • 2,580
0 votes
1 answer
74 views

Numberpicker send data to HomeFragment (Fragment to Fragment)

I have app who have viewpagers and in inside is numberpicker. I try to send this data to my HomeFragment but crash my app. This is my source code. What i do wrong? Create Interface for communication ...
slaKotlinDev's user avatar
1 vote
0 answers
94 views

Android Change TextColor of selected NumberPicker

I have created a NumberPicker in Android Studio but I cannot change the color of the selected item. The only thing I have found in this forum is this way: <style name="AppTheme.Picker" ...
Albert's user avatar
  • 11
0 votes
1 answer
265 views

Changing the font of a numberPicker - XML style doesn't change the font on Runtime

I use a NumberPicker in my android application of which I want to change the font, color, and font size. I looked a bit around and found this solution here: Setting typeFace to NumberPicker So I ...
Schwandes's user avatar
2 votes
1 answer
2k views

Call requires API level 29 (current min is 21): `android.widget.NumberPicker#setTextColor`

I want to change selected field of text color using setTextColor. But Android Studio gives me this error. What should I do? Min SDK is 21. This is code of my CustomNumberPicker class: import android....
MMG's user avatar
  • 3,224
0 votes
1 answer
364 views

How do I populate a number picker from a string-array (in the strings.xml)

I have a number picker and I can populate it with no problem from a regular array; however when I try to localize my app and place the array in the strings.xml file, that's when the frustration starts....
Ray's user avatar
  • 67
1 vote
2 answers
2k views

TimePicker with 15 minutes interval in xamarin forms

I need to set 15 minutes interval in Time Picker. I have done for iOS. But in Android it is not working. For iOS I used following code and it is working: public class CustomTimePickerRenderer : ...
anand's user avatar
  • 1,409
0 votes
1 answer
284 views

ng-number-picker component Angular8 - Count keep increment on `mousedown` and move away from the spinner button

There is issue with ng-number-picker component. If we mousedown on the number spinner buttons and drag the mouse with press state (don't let it fire mouseup event) outside of the spinner then it keep ...
Amitesh's user avatar
  • 2,947
2 votes
0 answers
270 views

How can I create Flutter numberpicker AlertDialog with more than 1 input?

I know I can use numberpicker pub.dev package to display an AlertDialog with one number wheel. How can I make an AlertDialog with more than one numberpicker?
leo848's user avatar
  • 647
0 votes
1 answer
567 views

How to use NumberPicker's textMapper(Flutter)?

enter image description here I am trying to use textMapper to change the text shown in NumberPicker. I found the TextMapper class, but I don't know how to use it. Please tell me how to use ...
invest hy's user avatar
1 vote
1 answer
4k views

How to write a Swift number picker in the alert controller like Android

How do I create a number picker with a minimum and a maximum defined by a variable? In my Android application, I created an AlertDialog with a picker number, and the maximum number is linked to a ...
Victor Appercé's user avatar
1 vote
3 answers
2k views

Increase Number Picker Wheel Item Count - Default set to 3 items in the Wheel

Currently by default the number picker only displays 3 values/items/elements at a time. I thought this will be easily changed but I was wrong. I cannot figure out how to change this. I looked around ...
Bob's user avatar
  • 47
0 votes
1 answer
345 views

NumberPicker looping when using onChange to set state within functional component

I am attempting to wrap a react-widgets NumberPicker in a functional component that updates state when onChange fires. When I click on the up or down arrow of the picker, it begins to flicker as if ...
Jay Shepherd's user avatar
  • 1,958
1 vote
2 answers
2k views

Passing multiple values to another Activity in Android Studio with Kotlin

Passing multiple values to another activity is not working in my android project. I want to create setting menu activity that passes setting values of the application in android. Those values are set ...
Kio's user avatar
  • 13
0 votes
0 answers
144 views

Is there a way to detect the "LongClick" event of a NumberPicker in Android?

I am trying to set the background of the NumberPicker as long as the user either scrolls with a touch swipe gesture or with the long press gesture. Currently I can only react on a touch swipe gesture. ...
Markus's user avatar
  • 123
0 votes
1 answer
733 views

TimePicker with 30 minute interval not working

I am working on a android application and i want to set the timepicker interval to 30 minutes instead of 1 minute by default. This is my code: private void setTimePickerIntervalZeroThirtyMinutes(...
Marcel Stiube's user avatar
1 vote
1 answer
521 views

How can i get the value from all the number pickers in my recycler view?

Hello everyone here's my code with recycler view, it works it charges 3 options from my database but my problem is when i try to get all the 3 values in my recycler view First of all here's my class: ...
Luis Ernesto Soto Valle Chang's user avatar
3 votes
2 answers
4k views

how to change numberpicker to show plus and minus buttons

I have a numberpicker - <NumberPicker android:id="@+id/shopping_cart_holder_quantity_picker" android:layout_width="wrap_content" android:...
Alon Shlider's user avatar
  • 1,247
1 vote
0 answers
93 views

How can I write a Number Picker, that will update an Object, and display the results?

As part of teaching myself to code Android Apps, I am writing an App to keep track of some numbers for a Board Game. As my screenshot shows, I have several values, with minus/plus buttons. The Ship (...
Black Spike's user avatar
1 vote
2 answers
9k views

How to create custom number picker in android?

How can I implement custom number picker in android the same below image? I have checked android arsenal library did not work any help will be appreciated.
Edgar Shvedskiy's user avatar
0 votes
1 answer
923 views

Add or Subtract the Integer Value of TextView using Number Picker in android

I have two number picker eg: reading numberpicker and poem numberpicker, each student is getting 10 points by default, every time a student makes a mistake the number picker increases and points ...
sulli110's user avatar
  • 165
0 votes
1 answer
1k views

How to disable scroll outside of NumberPicker element in Android

I have a NumberPicker element close to the bottom of the Activity. When the user scrolls down, the 'back' button gets clicked. I would like to disable scroll outside of the NumberPicker area. Number ...
user3196256's user avatar
4 votes
0 answers
2k views

Flutter: Number picker Horizontal Scroll and selected item always in middle

I am working on the number picker with horizontal scroll and the view looks like in the below image. I have tried to customize this library as per my requirement. But after customize, it looks like ...
Sunny's user avatar
  • 3,174
3 votes
2 answers
4k views

How to show more element of number picker list in flutter?

I used this for developing a number picker for my flutter application but it shows only three element of list of numbers in number picker . I want to show more element(for example 7) and beside, I ...
Atieh mn's user avatar
  • 193
0 votes
3 answers
840 views

how to fix "Cannot subscript a value of type 'ClosedRange<Int>' with an index of type 'Int' in swift"

I wanna prepare a basic number picker timer for my homework but I cannot fix this problem. var timer = Timer() var counter = 0 //let number = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "...
Kerem's user avatar
  • 11
4 votes
1 answer
344 views

How do I get the value of setFormatter using numberPicker?

Im using a numberPicker and found the answer to display 00, 01, 02... in my numberPicker, i used setFormatter. The problem is that when i call getValue() i will get 0, 1, 2... I need to get 00, 01, 02....
Allart's user avatar
  • 830
3 votes
3 answers
1k views

Android - NumberPicker with custom string data shows wrong value?

It is so simple, and it is so hard at the same time. MainActivity.java @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R....
peanut's user avatar
  • 133
1 vote
1 answer
160 views

NumberPicker with array from database

I wanted to help me develop a numberpicker with a list that I get from firebase, this code now gives me an error and if I delete "setMaxValue and MinValue" it only brings me a single value. ...
Ibrahim's user avatar
  • 23

1
2 3 4 5
8