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",)
}
Symmetric vs Asymmetric Encryption in Android Server - RRutors
How to stop EditText focus at Activity startup in Android?
How do I generate random numbers in Dart?
How to convert DP to Pixel and Pixel to Dp?
Decompile APK Files: How to Get Source Code - RRutors Guide
Extract Date and Time from Long Type Variable - RRutors
What is Android?
How to install/ uninstall apk by command line ADB
What is Intent? What is the difference between an implicit intent and an explicit intent?
How do i load image from drawable folder in Jetpack Compose?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
Fix Play Store Rejection Due to SMS Permission - RRutors
How to get a contact image using a phone number in android?
How to get screen size (width,height) in Android?
How to Generate signed apk with android studio
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
How to Exit android app on back pressed?
What is ANR? How to avoid and resolve it?
How do I check in SQLite whether a table exists?
What is the Different Between val and var in Kotlin?
How to validate email address in Android with Kotlin?
Set Activity to Fullscreen Mode in Android - RRutors
Check List for Generate Signed APK Android
What happens next when the device switches between portrait and landscape?
What is ANR in android?
What is Context?
Fix Android Emulator Kill Error When Running Your App
How to copy database from assets folder in android using kotlin
What is Application?
FCM Not Receiving Notifications in Android - RRutors
ERR_ACCESS_DENIED in Android Webview with sdk 30
Permission denied for window type 2010 in Marshmallow device
How to find Android Device UDID or unique ID?
How to avoid multiple button click at same time in android?
How to Get bitmap from drawable: Android
Android Studio project R can't find
Invoke-customs are only supported starting with android 0 --min-api 26
Open PDF in Google Drive with Intent in Android - RRutors
How To Set Text Color Programmatically Android TextView?
Explain Fragment Life Cycle