Changing highlighted text color - android

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>

Related

How to change the the spinner arrow in a drop down button? (the shape and locate)

I have been trying to customize a spinner, i try customize a style and/or write one layout. But in the end of the day i just change the background. the closest I got to what I want was:
<style name="Spinner" parent="Widget.AppCompat.Spinner">
<item name="backgroundTint">#A9292A</item>
</style>
and i only can change the side arrow by set the background.
what i trying to do is kinda like this :
EDIT:
I can do this by made my own layout but, this arrow going to be in all lines of the list and static. the arrow don't change for the down
By auther the style it's just change the backgaund an as i trying to put this arrow for the left side the text wil be above it.And also don't change the direction
Don't need give me the answer in strict way. But i hope a road to get.Can anyone help me? Thanks!

How to show html code on button in Android and style it

I want to put html codes on buttons as text in my android application and style them.
For ex: I want to create a help button and put "❔" as text to it.
Below is the code I have written in the activity.
Button btHelp=((Button) findViewById(R.id.btHelp));
btHelp.setText(Html.fromHtml("❔"));
But if I want to change the color of it. I tried by giving span and font in the above statement but it is not applying.
Can you please let me know how to give the colors for this. Also let me know if there is any better way to do so.
Thanks,
If you want to change text color, simply use:
btnHelp.setTextColor(Color.parseColor("#FF0000"));
or
btnHelp.setTextColor(Color.RED);
or
btnHelp.setTextColor(getResources().getColor(R.color.red));
But that won't work with emojis like your White Question Mark Ornament. If you want to change that question mark color, you will have to make a drawable file with button drawables (png) that have that question mark with the color you want. You can do that from photoshop or any other program.

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?

Android change TextField outline/boarder color

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

Categories

Resources