I am using numberpicker widget for showing a spinner wheel for string values. I want to show the complete text value in an item window in numberpicker. how can i achieve it? I have multiple number picker widgets aligned horizontally. I can view some of the text of an item but not all of it. Please help!
Show complete text value using numberpicker for strings in android
4k Views Asked by S.Khan At
2
There are 2 best solutions below
1
Meysam Keshvari
On
strings.xml
<string-array name="numberPicker">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
</string-array>
fill NumberPicker
binding.numberPicker.setMaxValue(getResources().getStringArray(R.array.numberPicker).length);
binding.numberPicker.setMinValue(0);
binding.numberPicker.getResources().getStringArray(R.array.numberPicker);
binding.numberPicker.setWrapSelectorWheel(true);
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in ANDROID
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in ANDROID-LAYOUT
- Push toolbar content below statusbar
- Java Heap Space error on Layout xml: GC overhead limit exceeded
- I want to Show Simple Toast Message When User Click On Media Controller button Pause/Start/Stop in video View Using Media Controller
- setBackground null pointer exception
- Show two activities simultaneously
- IllegalArgumentException:No view found for id
- Setting views dynamically with LayoutParams.addRule setting to the last position of the view
- Spinner Dropdown Arrow
- CoordinatorLayout, AppBarLayout and ToolBar - Toolbar doesn't scroll off the screen
- Is there a way to restrict the motion of an image view while dragging?
- Android ui with complex layout
- I have added 4 radio buttons but I cant find my radio group as i need its id
- crop bitmap in screen size from custom width
- Tool_Bar with android CardView and Transparent status bar
- Two views with same elevation side-by-side
Related Questions in ANDROID-NUMBER-PICKER
- Show complete text value using numberpicker for strings in android
- Number picker only allowing zero as value
- changing the color of number picker items
- How can I add NumberPicker on my Layout from Java code in my Android application?
- NumberPicker will raise ArrayIndexOutOfBoundsException if I select back to previous selection on first picker
- Multiple items have the same description
- Display two number pickers on textview
- How can we set a drawable background to scrolled position in Number Picker in Native Android
- NumberPicker Restrictions on non-SDK interfaces
- Making numberpicker with usernames picked from database by the volley library
- Call requires API level 29 (current min is 21): `android.widget.NumberPicker#setTextColor`
- Incorrect Activity when running App Android Studio
- How to get value of the NumberPicker instance from onValueChange when The NumberPicker not scrolling only(pressing plus or minus buttons) in Android
- java.lang.IndexOutOfBoundsException in NumberPicker
- Can we make custom horizontal NumberPicker in our own without library?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can just use the NumberPicker with an array of string
xml:
code: