How can I change the color of a selected text in the Android Studio Editor?
I want to change only the color highlight of the selected line(s) in Android Studio and not the overall background.
How can I do that?
Add the colors to your app In Android Studio, open colors. xml (app > res > values > colors. xml). After the existing colors, define a color resource named green using the value selected above, #1B5E20 .
We can change the color of an image programmatically in Android using the following setColorFilter method through the ImageView reference object.
Just go to res/values/styles.edit the xml file to change the color of action bar.
This is the same answer as the earlier accepted answer, but updated because of recent changes to Android Studio (ok, Android is a moving target, but here's the latest as of November 2018).
Preferences -> Editor -> Color Scheme -> General -> Editor -> Selection Background
Then click on the hexadecimal block to the right of "Background" to pull up a color chooser.
Go to Preferences -> Editor -> Colors and Fonts -> General, then change the "Selection Background" setting. See below:
Make sure you apply your changes; then you should see them reflected both in the preferences window and in your live code:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With