Questions tagged [android-spinner]

A spinner is a control/widget that allows the user to select an item from a group, like a dropdown list...

0
votes
1answer
29 views

Adding a listener to a MultiSelect spinner

I have created a class for a MultiSelect Spinner, but would like to add a specific listener onto it (in another class that accesses it) that will allow me to gather the selected indices from the ...
1
vote
2answers
38 views

How to populate second spinner from a selected value of first spinner from firebase [duplicate]

The java.lang.NullPointerException occurs to many other problems too. Mine was different, because the 2nd Spinner is not getting the value from the 1st spinner. The question What is a ...
0
votes
0answers
18 views

Android Spinner dropdown losing Items randomly during scroll up/down

While scrolling custom view spinner drop down its losing menu item. I tried all the accepted suggestions available here for similar type issues, nothing worked. here is the code. AndroidMnifest.xml ...
0
votes
1answer
52 views

How to retrieve individual selections from multiple spinners using one adapter?

I'm building a small unit conversion app that utilizes two spinners to allow for the selection of a from value and a to value. The two spinners are using the same adapter and the same string array in ...
-4
votes
1answer
39 views

Populating a Spinner with keys from a Firebase database, then another Spinner from the first's selection

I want to get all of the "Group No" keys in a single Spinner, then all of the "School No" keys of the selected "Group No" in a second Spinner. Here's my database: Here's my Java code: public class ...
0
votes
2answers
33 views

Make Spinner Text Align Properly

I am trying to Make SearchableSpinner Text Alignment Proper <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:...
-1
votes
0answers
25 views

Is there a way to make a custom item layout on NumberPicker?

I'm trying to create a list picker, i have checked the NumberPicker class, looks like it is not possible to change the layout so i think i have to make everything from scratch (works with ...
1
vote
0answers
24 views

Android spinner setAdapter hides progressbar

I don't know why but when i call setAdapter method for my adapter the rest of the view disappears. I'm going to explain what I mean. That's my view <?xml version="1.0" encoding="utf-8"?> <...
-1
votes
2answers
56 views

How to fix Android Spinner selection if it is not working?

Android Spinner is not working, the API is working and the Spinner's list of items is working. However, the item selection is not working. class PlayerSignup2Activity : AppCompatActivity() { ...
0
votes
1answer
37 views

Unable to Change Spinner dropdown icon

I want to change spinner dropdown icon to a location icon i went through a stack thread and i did modifications according to that. Here is what it is <Spinner android:id="@+id/spinner22"...
0
votes
1answer
27 views

Spinner Selection Not Working While Bringing Data From SQlite

I am bringing data from sqlite and want to update in some way.. I have the spinner in my list items which is using the Sqlite database. My Problem is as I select an Item from the sqlite list It is ...
-2
votes
0answers
16 views

How to fix app from crashing when clicking spinner after switching acitivities? [duplicate]

So I'm trying to create an android app in android studio and I've been stuck at this same error for a while now. So I got this view with a few buttons and spinners which I put in my main activity. ...
0
votes
0answers
17 views

First Item of spinner is not selectable until I select any other item and then reselect first item

I have created a spinner and facing a strange issue.First Item of spinner is not selectable until I select any other item and then reselect first item i.e.When I open spinner and try to select first ...
1
vote
1answer
25 views

Spinner with a underline and custom right arrow

I want to show spinner with a underline and a custom right arrow as shown below. I am setting below drawable as a background to spinner. <item> <layer-list> <item> ...
-3
votes
0answers
15 views

How to use a customised spinner between other views(EditText in this case)

I was trying to create a dropdown with a customized #Spinner, so whenever I run the app it keeps stoping. This is my activity_main file <?xml version="1.0" encoding="utf-8"?> <android....
0
votes
0answers
33 views

Custom Spinner with Grid-View

I am building a from using TextInputLayout+TextInputEditText and spinners. One of the spinners should have a custom dialog window like the below image. How can I achieve this?
0
votes
1answer
15 views

At second approach, second spinner value is not changing

I have used two spinners for dept and course in which I am setting courses of respective depts. When I try to select department again it is showing respective courses in the second spinner but not ...
0
votes
0answers
21 views

Characters after ' are ignored by Android Spinner [duplicate]

I am creating spinners in Android, but I found character after ' are ignored by the spinner. For example, when I add an item "Tian'anmen Square", only "Tian" appears in the spinner and all characters ...
0
votes
0answers
11 views

How to increase the height per item in android spinner dropdown view?

When I use this code: spinner_times_adapter = new ArrayAdapter(this,android.R.layout.simple_spinner_item, times_array); spinner_times_adapter.setDropDownViewResource(android.R.layout....
0
votes
2answers
38 views

How do I achieve having a dropdown list in an edittext? NOTE: I don't want to use spinner [closed]

Say "I want users to select from a dropdown list while filling a form, e.g Sex". Can I achieve exactly what is in the image attached? If yes, how?
-2
votes
0answers
19 views

Assistance with conditional spinners

I am currently learning android mobile dev and am starting to build a project for myself based on my own design. My problem is that I'm not sure where to start or how to implement what I want to do. ...
-2
votes
0answers
12 views

How To Update RecyclerView on spinner item selection?

Blockquote How To Update RecyclerView on spinner item selection ?
3
votes
0answers
69 views

Spinner Dropdown list doesn't open on DialogFragment

I'm trying to create a custom dialog that extends DialogFragment, when I was create a simple Dialog the spinner dropdown work well and react when I tried to open it. On DialogFragment the spinner ...
2
votes
1answer
42 views

2 Spinners: Populate second spinner from first spinner id selected using Retrofit

Hi I working with my android, I have two spinners and using retrofit to populate my spinners. I manage to populate first spinner. But I don't know how to get my second spinner populated under id ...
0
votes
0answers
6 views

how to send selected spinner position data to server

My Json:- I have display below json city_name in spinner. When i select city_name then i want to send particular city_id to server. example :- spinner select city_name is Thane then i want to send "...
-1
votes
1answer
24 views

How to get value from this multi select spinner and save it to String?

I confuse about printing checked data from multi select spinner to textview, what should i do ? https://megam.info/a/38418249/11182330
1
vote
1answer
47 views

Error when filling the spinner with array of string elements for the second time

I have a spinner that allows me to select a particular text. I am creating a second spinner programmatically and putting (in it) differents arrays of string elements depending on the choice made in a ...
0
votes
1answer
46 views

spinner is not displaying proper while adding blank row

I am displaying spinner in recyclerview row. when i add blank row using "Add Member" button, spinner display half like below image Please help me.i search on google but i didn't get any solution ...
1
vote
0answers
24 views

How to set default value of spinner

I have a spinner to Change font size of TextView, I use background for the spinner as shown in first picture. I have two problems, First: when I run the app the spinner looks like the second picture I ...
0
votes
3answers
54 views

Spinner dependent problem when going to a textview

I'm using a code with a dependent spinner, but I have the following problem: the spinner loads from a JSON file correctly, but when I try to pass the result of the first spinner to a textview, it ...
-1
votes
1answer
31 views

How can i add divider to my drop down list (spinner)?

before click after click - i'd like to add such blue line I would like to add divider to my drop down list. I used solutions which I found on stackoverflow but they didn't work. This is my xml ...
0
votes
0answers
25 views

Spinner Choice selection and a display list

i have design an screen in which a spinner have 3 values(i.e Single choice, Multiple Choice, Multiline) when click on single choice a then display a single textview and when select multiple choice ...
0
votes
0answers
26 views

Stop fragments calling onCreateOptionsMenu

I have an app where users can switch between a list fragment and a map fragment using a switch within the single activity. I am having issues where when a users switches the fragment view, ...
0
votes
2answers
36 views

How to create a second spinner whose list of options depends on the input of the first spinner?

I've searched the web and couldn't find a solution. What I'm trying to do is display a list of an array on the second spinner depending on the selected option from the first spinner. The logic would ...
0
votes
1answer
19 views

Make a spinner invisible but still access to his selected item?

I would like to know if there is any way to access a spinner selected item while we set it to hidden ? I've tried spinner.setVisibility(View.GONE) but then the selected item is null. Looks like this ...
0
votes
1answer
38 views

Spinner Array needs to link it's items to existing layouts?

So the spinner I have currently picks from a programmatic array which fetches names and images based on what's in the array. What I need is to only pick from items in the array if they exist based on ...
0
votes
1answer
20 views

Populating EditText with string based on spinner selection

I have created the following activity that passes the data of Edittext values using an intent across multiple activities. I want to be able to populate the EditText values based on the user selection ...
0
votes
0answers
30 views

How do I update TextView using 2 seperate spinner not independent of each other?

In this app, each spinner is used to make an API call. Now, spinner 1 is for the coin(crypto) and 2 is for currency(USD, YEN etc) in which coin is to be displayed. The spinner 1 works perfectly fine! ...
0
votes
3answers
41 views

Enable Button when Spinner and EditText are not empty in Dialog

In my AlertDialog, I have a Spinner and an EditText. I am trying to disable the positive button of the dialog if selected item at Spinner is "Select currency" ("Select currency" is the first item in ...
0
votes
1answer
44 views

Crash after implementing Spinner

I have implemented a RecyclerView with a custom adapter that adds a my own custom objects made from the my class Item. Now I am trying to add a Spinner that will have a list of Strings where when you ...
0
votes
1answer
22 views

How to inflate a Vector inside a Selector of a Spinner in Android?

In my app, I'm having this spinner: <Spinner android:layout_width="250dp" android:layout_height="wrap_content" android:id="@+id/spinner" android:background="@drawable/spinner"> &...
0
votes
1answer
49 views

Calling value from OnItemSelectedListener

I have a value from the selected item in spinner passed to a String variable 'selectedSpinner' using spinner.setOnItemSelectedListener(). I am trying to access 'selectedSpinner' outside of the method. ...
2
votes
1answer
54 views

OnItemSelectedListener in Dialog

I have a spinner in a dialog and I am trying to get the value from the selected item in spinner and pass it to a String variable. The method that I have found was spinner.setOnItemSelectedListener(). ...
3
votes
1answer
110 views

Android Spinner jumps to previous selected positions

I am using AppCompatSpinner to show the list of states. Initially, I saved the first position item. Then After if I click the spinner and try to scroll slowly that time it goes to the previous ...
0
votes
0answers
9 views

Android Studio: fix arrowdown position of spinner

I am trying to set the position of the arrow down of a spinner inside a custom adapter. The content of the spinner is the number of products available for sales. But, as can be seen on the picture, ...
0
votes
1answer
35 views

How to make item selector on spinner work

String [] product = new String [] { "Item A - 15$", "Item B - 12$", "item C - 30$", "Item D - 40$", }; ArrayAdapter<String> ...
0
votes
0answers
34 views

How we Set data into Spinner in RecylerViewList Adapter from Back4app Database

I make RecylerViewList, in which having Spinner DropDown. So I want to show data into Spinner dynamically. Every Spinner in RecylerViewList has its own array of data. Click Here:- It is my ...
0
votes
0answers
10 views

Spinner Not Selecting Item with Custom Object Android Studio

I am populating a spinner using an ArrayList of Custom Objects. The spinner displays all the items I need fine but the issue is when selecting an item. With dummy data it works and the item selected ...
0
votes
1answer
20 views

view of spinner doesn't gets updated

I am using spinners which are dependent on one another. So when i choose one value in a spinner A the arraylist of other spinners B,C,D change accordingly. when I select item at position 1 on spinner ...
0
votes
1answer
36 views

I cannot set entries in sppiner with ViewModel, any idea?

I am trying set values in a spinner for this I have the following code: Strings.xml <string-array name="entries_list"> <item>A</item> <item>B</item> <...