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?
Related
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?
I have a custom font, in which my "fi" is replaced with "r". Do you have any idea how to disable ligatures in my fonts in Flutter?
If you've followed how to add custom font in your entire Flutter app, there shouldn't be any problem.
Flutter works with custom fonts and you can apply a custom font across
an entire app or to individual widgets. This recipe creates an app
that uses custom fonts with the following steps:
Import the font files.
Declare the font in the pubspec.
Set a font as the default.
Use a font in a specific widget.
If this is not the case, try to provide a a minimal, complete and verifiable example.
In my UWP application in tile I set black color of background, and icon has transperent background, it's look very well. But then i change theme in windows 10(desktop) to white and my tile change background color to white. Why is it happend, when i set color - black in manifest of application. Like in this application.
Best regards, Dmitry
I can't add a comment but if you mean the high contrast setting I do not believe this is possible since the tile settings cannot be changed at runtime and there is no other way to set the color outside of the apps manifest. You can create override the styles for other controls but not for the tiles properties.
"Note It’s possible to override the system color resources for high-contrast color and accent color by creating resources with the same names, but it’s a best practice to respect the user’s color choices, especially for high-contrast settings. Xaml Theme Resources
More on high contrast themes here: High Contrast Themes - MSDN
I would instead try setting the image background to not be transparent and take up the whole space of the tile. You won't be able to change it but it appears you want it always black anyways. I am not certain this will work in your scenario though since you are using a live tile and not just an image.
You may also want to look at using a secondary tile: Theme Resources
The theme is not updating according devices(OS), when i used App compact, it changed the text color and in many of the screen not showing text/ cursors. Some of the places the UI is disturbed.
What is the best way to manage theme for for different OS?
I have created a layout that has xml files, these xml files are joined by "include" to make one layout in hdpi.I have texts in these files. I have given size for the text in dp. However, when i run the app in smartphone with mdpi screens, my layout heigh can not fit the screens. My layout's not resizing. Please help me with this question