Android change TextField outline/boarder color - android

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

Related

Android Spinner Color style

Is there a way of changing the color of the Spinner control?
For example, Android 6 will render text with an arrow. I need to change the color of that arrow.
The change should apply to any version of android.
For example, Android 4 has underline with corner triangle. I have seen some approaches where you replace the icon that is being drawn, but that solution would not work for me. I need to change the color of the default icon.
Update
I have found how to apply style on Android Spinner using styles.xml,
<item name="android:spinnerStyle">#style/SpinnerItem</item>
but I cannot find what is the correct style to apply for the icon color to change.
It turns out, there is no nice way of doing this. It is possible to change the images used for the spinner, but then I would need to provide different set of images for each version, and also have conditionals / logic on the android code, to specify which set should be used based on version.

Changing highlighted text color

I have just a edittext on a card, created with relativelayout. When i double press on it, to mark it, the color of the two markes, right and left from the text a bit lower, have the same color as the card, because of that i want to change the color of the markers. The bar above the toolbar, and under the statusbar, is currently white, how u can see on the picture, that i want to change too, with animations and colors :D Maybe somebody can help me at my difficulties
Thanks in advance :)
It looks currently like this:
Try using android:textColorHighlight in your edit text
Just got the answer by myself :D I just pasted following line in my styles.xml
<item name="colorControlActivated">#607D8B</item>

TextView shaded corner indicating clickable

When using the stock calendar app, and others including GMail, I have noticed how the TextViews have a light grey underline and a light grey corner to indicate that it is clickable.
How can I style my own TextViews to look like this? I cannot seem to find anything about this previously so it would be nice to know so I can keep my app inline with the stock Android experience.
I have looked through the source code but cannot figure out how this has been done.
Are you sure that it's a TextView and not an EditText?
That is a Spinner, not a TextView.
http://developer.android.com/guide/topics/ui/controls/spinner.html

Changing the color of the spinner

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

Spinner has Grey Text, why? How can I change it to default text colour instead?

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?

Categories

Resources