Summary of Improvement
Migrate existing vector drawable resources (.xml files) to Jetpack Compose’s ImageVector format using the rememberVectorPainter or Icons API for improved performance, consistency, and compatibility within the Compose UI framework.
Current Implementation
Currently, vector assets are defined in .xml format and rendered using painterResource(id = R.drawable.some_icon) in Compose. This requires compatibility layers and doesn't leverage the full power of Compose's vector APIs.
Note: Several icons are being introduced by #22.
Proposed Solution
Convert all .xml vector drawables to Kotlin-based ImageVector objects using any plugin or manually. Replace usages of painterResource(R.drawable.some_icon) with rememberVectorPainter(image = SomeIcon) or directly use the generated Icons where applicable. This enables:
- Seamless theming and tinting
- Better performance
- Full Compose-native integration
Summary of Improvement
Migrate existing vector drawable resources (
.xmlfiles) to Jetpack Compose’sImageVectorformat using therememberVectorPainterorIconsAPI for improved performance, consistency, and compatibility within the Compose UI framework.Current Implementation
Currently, vector assets are defined in
.xmlformat and rendered usingpainterResource(id = R.drawable.some_icon)in Compose. This requires compatibility layers and doesn't leverage the full power of Compose's vector APIs.Note: Several icons are being introduced by #22.
Proposed Solution
Convert all
.xmlvector drawables to Kotlin-basedImageVectorobjects using any plugin or manually. Replace usages ofpainterResource(R.drawable.some_icon)withrememberVectorPainter(image = SomeIcon)or directly use the generatedIconswhere applicable. This enables: