In Jetpack compose example to load image from drawable folder we will use below code. In the above example we used image composable and create Painter object from painterResource() and pass the resource id. You can read more about Image composable in Jetpack compose
@Composable
fun LoadFromResourceDemo(){
val image: Painter = painterResource(id = R.drawable.image1)
Image(painter = image,contentDescription = "image",)
}
What is "shared preferences" in Android ?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
Extract Date and Time from Long Type Variable - RRutors
How to stop EditText focus at Activity startup in Android?
How to Generate signed apk with android studio
What is ANR? How to avoid and resolve it?
FCM Not Receiving Notifications in Android - RRutors
Check List for Generate Signed APK Android
Open PDF in Google Drive with Intent in Android - RRutors
How do i load image from drawable folder in Jetpack Compose?
Permission denied for window type 2010 in Marshmallow device
How to get screen size (width,height) in Android?
Key Points to remember while develop the Android Application.
Symmetric vs Asymmetric Encryption in Android Server - RRutors
How to convert milli seconds to hours, minutes and seconds in Android?
How to Exit android app on back pressed?
How to Get bitmap from drawable: Android
How do I generate random numbers in Dart?
How to validate email address in Android with Kotlin?
Hide/Disable soft keyboard on Activity launch: Android
How to check Android version?
What is Android?
How can i comment inside xml file in android studio?
How to Use Deprecated Handler() in Android - RRutors Guide
What is Android Fragments?
How to convert DP to Pixel and Pixel to Dp?
What is ANR in android?
What happens next when the device switches between portrait and landscape?
What is Intent? What is the difference between an implicit intent and an explicit intent?
Invoke-customs are only supported starting with android 0 --min-api 26
How to install/ uninstall apk by command line ADB
Android Studio project R can't find
What is Application?
How to save activity State in Android?
What are the notifications available in android?
Decompile APK Files: How to Get Source Code - RRutors Guide
Fix Duplicate Files in APK Build.gradle Issue - RRutors
What is the difference between match_parent and fill_parent?
What is the Different Between val and var in Kotlin?
How to avoid multiple button click at same time in android?