Setting background resources for Image in Jetpack Compose

Abhimanyu
Make Apps Simple
Published in
Oct 8, 2022
Sample Image with foreground and background drawable resource

In the Android View-based system, ImageView can have background and foreground drawable resources like this,

To achieve the same using Jetpack Compose, we can use the Paint modifier like this,

As this is a Modifier , it can be used for Composables other Image like Box , Row , Column , etc as well.

Please comment with your valuable feedback. It would help me to improvise.

Kindly πŸ‘πŸ‘πŸ‘ if this was useful.

Please follow if you would like to see more content related to Android Jetpack Compose.

LinkedIn: https://www.linkedin.com/in/abhimanyu-n/

--

--