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 are the notifications available in android?
How to start a new activity on button click
How to Exit android app on back pressed?
What is Intent? What is the difference between an implicit intent and an explicit intent?
What is "shared preferences" in Android ?
How to stop EditText focus at Activity startup in Android?
How to get screen size (width,height) in Android?
How do I generate random numbers in Dart?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
How to validate email address in Android with Kotlin?
Extract Date and Time from Long Type Variable - RRutors
What is NetworkOnMainThread Exception?
How to convert milli seconds to hours, minutes and seconds in Android?
Decompile APK Files: How to Get Source Code - RRutors Guide
What is Android Fragments?
What is ANR? How to avoid and resolve it?
What are Android Versions available?
How to install/ uninstall apk by command line ADB
How to reduce APK package size?
What is Application?
How to check Android version?
How to Get bitmap from drawable: Android
How do i load image from drawable folder in Jetpack Compose?
ERR_ACCESS_DENIED in Android Webview with sdk 30
Add Jar/Library Files as Dependency in Android Studio
How to find Android Device UDID or unique ID?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
Set Activity to Fullscreen Mode in Android - RRutors
Symmetric vs Asymmetric Encryption in Android Server - RRutors
How to convert DP to Pixel and Pixel to Dp?
Key Points to remember while develop the Android Application.
Permission denied for window type 2010 in Marshmallow device
What is ANR in android?
Check List for Generate Signed APK Android
Invoke-customs are only supported starting with android 0 --min-api 26
Fix Play Store Rejection Due to SMS Permission - RRutors
How to Use Deprecated Handler() in Android - RRutors Guide
Fix Duplicate Files in APK Build.gradle Issue - RRutors
What is Android?
What happens next when the device switches between portrait and landscape?