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",)
}
Set Activity to Fullscreen Mode in Android - RRutors
How to convert milli seconds to hours, minutes and seconds in Android?
How to Generate signed apk with android studio
Check List for Generate Signed APK Android
Hide/Disable soft keyboard on Activity launch: Android
Symmetric vs Asymmetric Encryption in Android Server - RRutors
How to stop EditText focus at Activity startup in Android?
How to Get bitmap from drawable: Android
Fix Android Emulator Kill Error When Running Your App
How to avoid multiple button click at same time in android?
Android Studio project R can't find
Extract Date and Time from Long Type Variable - RRutors
How to convert DP to Pixel and Pixel to Dp?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
Decompile APK Files: How to Get Source Code - RRutors Guide
How to copy database from assets folder in android using kotlin
How to check Android version?
What is NetworkOnMainThread Exception?
What is the difference between match_parent and fill_parent?
How do I generate random numbers in Dart?
How to install/ uninstall apk by command line ADB
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
Add Jar/Library Files as Dependency in Android Studio
Invoke-customs are only supported starting with android 0 --min-api 26
How to validate email address in Android with Kotlin?
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
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?
Open PDF in Google Drive with Intent in Android - RRutors
How to reduce APK package size?
What is the Different Between val and var in Kotlin?
How do I check in SQLite whether a table exists?
How to Use Deprecated Handler() in Android - RRutors Guide
What are Android Versions available?
How To Set Text Color Programmatically Android TextView?
How to get complete address from latitude and longitude?
Key Points to remember while develop the Android Application.
ERR_ACCESS_DENIED in Android Webview with sdk 30
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
How to start a new activity on button click