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/

--

--

Make Apps Simple
Make Apps Simple

Published in Make Apps Simple

Working on ways to improve apps from planning, requirement gathering to end-user experience.