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
Related
Is there a Material component that will easily let me set the left of a TextInputEditText to be a dropdown like this image below? If not, I can create something, but wanted to see if anyone knew more about Material components before I start doing too much custom work. Looks custom to me, though.
With material component, Google has removed spinner from its UI Elements.
Preferred way to do it is TextInputLayout along with AutoCompleteTextView just like Ashu has mentioned in the comment section.
Here is a more thorough article, which can help you in implementing AutoCompleteTextView.
https://blog.usejournal.com/there-is-no-material-design-spinner-for-android-3261b7c77da8
So far, both answers say to use AutoCompleteTextView. However, that doesn't answer my question. As you can see in the image I posted with the question, only the left side is a drop down. The right side is just a normal text input that isn't affected by the drop down.
However, I think it is safe to assume there isn't a component that will do this for me easily and that it would indeed be custom work to make these two components appear to be one single component.
I have a section where user selects a gender.
It looks like this.
However, I want it to look like this.
I researched, but could not find the solution.
How can I get this design?
Thanks!
It would be very easy to do using ToggleButtons instead of RadioButtons. You could just use a compound drawable in the button label.
Can anyone give me some idea or code if possible regarding how to change the Theme of Listview ( like the back ground color, text color, icons etc) by clicking a button for example at runtime?
I saw an example here android dynamically change style at runtime.
I want to know if something similar is possible for List Views?
Thank You.
For changing the Bg color, you can set it dynamically.
mListView.setBackgroundColor(mColor); //doc
For changing the design in your listView, you have to set some variables, then use them in your custom adapter. When you click, you change these variables and call the notifyDataSetChanged() method.
Hope this will help you.
If I understand your question correctly, you want to customize the look and feel of the rows (individually or all) dynamically. If so, using a custom adapter and overriding the getView(...) function will probably work for you.
A quick explanation is available at http://www.mkyong.com/android/android-listview-example/
Hope this helps.
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 :)
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?