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",)
}
FCM Not Receiving Notifications in Android - RRutors
How To Set Text Color Programmatically Android TextView?
How do I check in SQLite whether a table exists?
How to get screen size (width,height) in Android?
How to avoid multiple button click at same time in android?
How to save activity State in Android?
What is the difference between match_parent and fill_parent?
How can i comment inside xml file in android studio?
Fix Duplicate Files in APK Build.gradle Issue - RRutors
What is Context?
Extract Date and Time from Long Type Variable - RRutors
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
How to get a contact image using a phone number in android?
What is Application?
What is Intent? What is the difference between an implicit intent and an explicit intent?
How to stop EditText focus at Activity startup in Android?
ERR_ACCESS_DENIED in Android Webview with sdk 30
Fix Android Emulator Kill Error When Running Your App
How do I generate random numbers in Dart?
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
What are Android Versions available?
Decompile APK Files: How to Get Source Code - RRutors Guide
How to Get bitmap from drawable: Android
Symmetric vs Asymmetric Encryption in Android Server - RRutors
Invoke-customs are only supported starting with android 0 --min-api 26
What is Android?
How to check Android version?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
How to validate email address in Android with Kotlin?
Hide/Disable soft keyboard on Activity launch: Android
Set Activity to Fullscreen Mode in Android - RRutors
How to Exit android app on back pressed?
What is ANR? How to avoid and resolve it?
Open PDF in Google Drive with Intent in Android - RRutors
Add Jar/Library Files as Dependency in Android Studio
What happens next when the device switches between portrait and landscape?
Check List for Generate Signed APK Android
What is ANR in android?
How to find Android Device UDID or unique ID?
How to get an image resource by it's name in android?