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",)
}
How to get a contact image using a phone number in android?
Android Studio project R can't find
What is Android Fragments?
What is Application?
How to Generate signed apk with android studio
How to check Android version?
How do i load image from drawable folder in Jetpack Compose?
What are Android Versions available?
Set Activity to Fullscreen Mode in Android - RRutors
What is the Different Between val and var in Kotlin?
How to reduce APK package size?
How do I generate random numbers in Dart?
How to stop EditText focus at Activity startup in Android?
Extract Date and Time from Long Type Variable - RRutors
How to get complete address from latitude and longitude?
How do I check in SQLite whether a table exists?
What is "shared preferences" in Android ?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
How to get screen size (width,height) in Android?
How to validate email address in Android with Kotlin?
Fix Play Store Rejection Due to SMS Permission - RRutors
What happens next when the device switches between portrait and landscape?
How to avoid multiple button click at same time in android?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
What is Android?
How to start a new activity on button click
Open PDF in Google Drive with Intent in Android - RRutors
What is ANR in android?
What is NetworkOnMainThread Exception?
Add Jar/Library Files as Dependency in Android Studio
How to save activity State in Android?
How to find Android Device UDID or unique ID?
What is Context?
How to convert DP to Pixel and Pixel to Dp?
How can i comment inside xml file in android studio?
Invoke-customs are only supported starting with android 0 --min-api 26
How to install/ uninstall apk by command line ADB
Fix Duplicate Files in APK Build.gradle Issue - RRutors
What are the notifications available in android?
Key Points to remember while develop the Android Application.