previously, we could have vector drawables with th...
# compose
m
previously, we could have vector drawables with theme colors, ex:
Copy code
<vector xmlns:android="<http://schemas.android.com/apk/res/android>"
    android:width="184dp"
    android:height="184dp"
    android:viewportWidth="184"
    android:viewportHeight="184">
    <path
        android:fillColor="?attr/colorPrimary"
        android:fillType="evenOdd"
        android:pathData="M22 92a70 70 0 1 1 140 0 70 70 0 1 1-140 0" />
is there any recommended path for compose ?
a
Use
tint
attribute of
Icon
m
ya, doesn’t really work. Only parts of the vector are colored dynamically based on theme primary color
p
Currently, I think, the best approach is still to continue defining theme and colors in xml and reference xml colors from compose. Otherwise your theme will be different until activity boots up. Taking that into account, basically nothing changed in your case :)
m
ya kinda. but if you have single app multi fragment approach, and you have different themes for each feature, you would have to define the theme in xml parent. OR just use wrapperLayoutInflator or sth with new theme for the fragment. But since compose get’s rid of all of that. hm … idk. Maybe use LayoutInflator theme wrapper for ComposeView ?