Like overflow menu overlaps the toolbar same way spinner overlaps itself when it is shown drop down item in lollipop and above android version. So I need to place it below the spinner view not over it.
Try removing the xml attribute android:clickable="true" from the Spinner widget. It could be that the entire spinner is registering the click event rather than the individual spinner items.
Spinners provide a quick way to select one value from a set. In the default state, a spinner shows its currently selected value. Touching the spinner displays a dropdown menu with all other available values, from which the user can select a new one.
Android Spinner is a view similar to the dropdown list which is used to select one option from the list of options. It provides an easy way to select one item from the list of items and it shows a dropdown list of all values when we click on it.
Android Spinner Search Hint Prompt Text And Background Color Example is for you. You will learn to set prompt programmatically and to change prompt text and background color. In android app, developer uses spinner to ask user to select any one choice from drop down menu or pop up dialog.
You can use
android:overlapAnchor="false"
This will show the dropdown below the spinner view (Work on api level 21 and higher).
For all api use
android:dropDownVerticalOffset="35dp"
or whatever value that suits your needs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With