How to change preview color of the drawable icons in Android Studio depending on theme color? - android-studio

All vector icons in Android are white by default (generated by Google Fonts or Vector Assets), but have a tint set to ?attr/colorControlNormal. When we look at asset previews, Android Studio doesn't render this tint, it just uses the base color. In the Dark theme it looks fine, but I'm using a Light theme and the icons are indistinguishable on a light background. How can I change the color of this background in Android Studio without resorting to changing the color in the icons themselves?

Related

How to I turn an Android device navigation bar color to white without the images still being white

This is an image of the results I get when changing the navigation bar color using Window w = this.getWindow();w.setNavigationBarColor(Color.parseColor(0xFFFFFFFF));
https://i.stack.imgur.com/CYpgg.png
From version 1.5.0 of Core library it is pretty simple to change navigation icons color to dark using this code in your activity:
WindowInsetsControllerCompat(window, window.decorView).isAppearanceLightNavigationBars = true
But be aware that dark navigation icons are supported only from Android 8.0 (API level 26). On lower OS versions you should keep navigation bar color darker, to keep navigation icons visible.

How to apply a lighter background to Darcula theme in Android Studio?

In Darcula, when the font color is also dark - as in the green below - then it is hard to read against the pitch black background and bugs hide in the undergrowth.
Is there a way to change the background from pitch black to a lighter shade, for example gray (without the glare from the default theme)?
Go to Settings > Editor > Color scheme > General
Select Text > Default text
Change background color from the right panel
As La Bla Bla suggested, you can customise the theme in settings.
OR you could download an entirely new theme from JetBrains' selection here:
https://plugins.jetbrains.com/search?tags=Theme
and import it using these steps:
How to change or add theme to Android Studio?

Android - Changing ActionBar's icons dynamically to fit the theme (dark/light)

I have an app which has multiple themes, some of them are "light" themes and some are "dark".
In my actionbar I have mutiple icons, which I've downloaded as PNGs from Google's material icons website.
Questions:
How do I change them to be black/white according to the theme?
If the answer is to use vectors, how still do I make them change color? Would vector icons affect performance?

Change font color in dracula theme in android studio

How can I change font color in dracula theme in android studio? cause with color's font now, the color less bright.
File->Settings->Editor->Colors & Fonts
Download themes in .jar format from web. Then go to File -> Import Settings and choose the file downloaded
Bonus
But this theme might add more colors to your coding life.
Link with more details:
http://envyandroid.com/monokai-theme-in-android-studio-and-intellij/
Inside Settings goto: Editor > Colors & Fonts > Java there you can change the color of any attribute.

Change theme color in Android Studio of Resouce identifier

does anyone know where I can change the theme color of the identifier of a Resource in Android studio?
Currently I have a black theme, but the purple color makes it unreadable. I have tried other dark themes but it always stays purple. I searched for it in settings but I was unable to find it.
example image of how it is now
You can go to File->settings->Editor->Color&Fonts where you can make a copy of the default theme and change colors of everything.
File->settings->Editor->Color&Fonts
If you want more theme you can google it download it and then import it in the Android studio

Resources