In this picture you can see (barely lol) that the spinner icons that rest on the bottom and bottom right are very hard to see due to the black background that I am using. What would I need to do to make that greyish looking color to white or any color for that matter?
Try this tutorial:
Android Custom Spinners
A similar process is used for working with custom buttons and other elements.
Updated as the link is broken. Try this stackoverflow answer
Spinner Background Design
Related
I've spent way too much time researching this, but I'm wondering if anyone can provide any insight to how Android does its spinner styling with the triangle dropdown indicator?
The reason I want to know is that I am using a custom textview as spinner item, and once I use that I lose the triangle. In addition, I want to make the triangle white.
I've seen previous answers with modifying the theme but I don't want all spinners to change so I don't want to modify the entire theme. I want to learn how Android does the triangle so I can recreate it. I tried using a list-layout drawable with a triangle shape but I'm wondering if there is a better way?
You can set drawbleEnd
android:drawableEnd="#drawable/imgresource"
create an image of how you want as your spinners background with whatever type or triangle and whichever color your want and then set that image as the background of your textview like this
android:background="#drawable/myBackground"
It a simple Nine Patch Drawable.
You can create a NinePatch graphic, set a black dot on the top and left to expand the top and left edges. With a triangle in the bottom right.
I created with Android Studio 1.0 a new project and added a spinner. But the result doesn't look very understandable. It's not clear enough that the spinner is a clickable object. It shows only the top element and a small arrow down. My default Spinner
I've implemented the spinner the way the developer-page from android describes.
How can I change it to something, that looks more like this.
I've tried things like setting the background color, but in the result the little arrow disappears.
How is it possible, that my default layout looks so different from the declared one by developer.android.com?
In any case you can create your own custom spinner or set some selector to it. For example: http://androidexample.com/Custom_Spinner_With_Image_And_Text_-_Android_Example/index.php?view=article_discription&aid=84&aaid=107
Currently I'm using ActionBarSherlock and custom ListView Adapter, but I have this strange case on my ListView. There's different color at the top of ListView, and Icon background should be transparent, but it has background color. Please take a look at the picture and if you don't mind, enlighten me.
This problem come with ActionSherlockBar theme, to be precise is Theme.Sherlock.Light.DarkActionBar. When I set to Theme.Sherlock.Light this problem don't appear. I don't know why.
I implemented this kind of thing in my app but can't figure out why it turns text grey, like in the photo...
anyone know why? and I how do i change it to default text colour? the spinner in my layout file looks like black text.. but when I run it, it is grey just like in this sample.
http://android-er.blogspot.com/2010/12/custom-spinner-with-icon.html
You'll have to create a custom adapter to hook into the creation of the views. Similar SO question with some useful info for you: Change spinner font color
I'm not sure if I really get your question, but if you want to change the text color of the items of the spinner, just add android:textColor="your color here" to the TextView of row.xml.
yeah I think my question was flawed.. seems like maybe this light grey is default color.. but it looks horrible (unreadable almost) on my galaxy s2.. on emulator it looks ok, but a little light..
it is first spinner i ever created...
so I solved it by hard-coding a darker grey... but I don't like hard coding because I am unsure if some android devices would skin the background of the spinner to some color that makes a dark grey unreadable?
I have a text field, and on Android 2.2, when it is in focus or being used, it highlights it and puts an orange boarder around it.
The orange really doesn't look good with the other colors in my app, so I am wondering if there is any way to change that to a different color...
Thanks in advance.
You can write selectors for your textview using which you can change the appearance of your textview when it is selected.
You can refer to this:
http://developer.android.com/reference/android/content/res/ColorStateList.html