Spinner Dropdown instead of Pop up with an overlay? - android

I would like to have my spinner drop down just like a web form. I don't want the options to pop up in a modal style window. Is this possible, and if so, how?

The feature you're looking for is the spinnerMode attribute which has "popup" and "dropdown" modes, which you should set to "dropdown" in order to get what you want. Just add
android:spinnerMode="dropdown"
to the declaration in your layout XML.

Looks like you could just use MODE_DROPDOWN with the spinner.

This is not supported in SDK as far as I know, so I guess you will have to write your own Spinner to get this functionality. It would be nice though :)

Related

How to implement styled popup of AutoCompleteTextView?

I need to style a popup window of AutoCompleteTextView. What I noticed on tutorials is that the only styling that people do is setting of custom shape with android:popupBackground attribute. This is not enough for me. I basically need to put custom layout (combination of TextViews, clickable texts and of course array of search result items suggested by AutoCompleteTextView.Here is schematic of my need:
How to implement described? Thanks!

Android, change button style at runtime

I need to change button style from "contained" to "outlined" at runtime.
For now the only way I've found to create an outlined button is to set its style to ?attr/materialButtonOutlinedStyle.
Unfortunately I haven't found a way to change the style at runtime, is it possible?
Is there any way to get this effect?
As a view with text inside, it should have "setTextAppearance" function. It's not the ideal option but may help. Also can be useful to look on https://github.com/airbnb/paris.

Android spinner doesn't look right

I want to change the appearance of my spinner. Here's how it currently looks like
Here's how I want to look like -
Please suggest me how can I make this change?
You need to implement your own style for your spinner.
There is no another way to change somethings in it design.
How to do that, you can find as example there

I am using spinners, I want to change the style in which they open

I want the spinner to open in a popup manner instead of the list manner which i am getting right now. I have tried changing the theme as well. The spinner worked in the popup manner in the lower version devices. What can i do?thanks in advance.
I want the opposite of what problem is discussed here Android: Change Spinner Dropdown view
On your xml file, set
android:spinnerMode="dialog"
on your spinner.

Text Picker Component

Does something exist for Android? I am looking for something equivalent to HTML's tag. I see things like NumberPicker, but I can't see any way to have a basic drop down selector.
I am aware of ListPreference, but I want to use it outside the context of a PreferenceActivity and inside arbitrary views. Anyone?
Are you looking for the spinner, maybe?

Categories

Resources