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",)
}
Fix Play Store Rejection Due to SMS Permission - RRutors
What is NetworkOnMainThread Exception?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
Hide/Disable soft keyboard on Activity launch: Android
What is Android?
How to avoid multiple button click at same time in android?
Symmetric vs Asymmetric Encryption in Android Server - RRutors
How do I check in SQLite whether a table exists?
How to convert DP to Pixel and Pixel to Dp?
What happens next when the device switches between portrait and landscape?
How to Exit android app on back pressed?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
How to install/ uninstall apk by command line ADB
ERR_ACCESS_DENIED in Android Webview with sdk 30
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
FCM Not Receiving Notifications in Android - RRutors
How To Set Text Color Programmatically Android TextView?
How to Get bitmap from drawable: Android
How to get complete address from latitude and longitude?
Explain Fragment Life Cycle
How to find Android Device UDID or unique ID?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
What is Android Fragments?
Check List for Generate Signed APK Android
How to copy database from assets folder in android using kotlin
Permission denied for window type 2010 in Marshmallow device
Fix Duplicate Files in APK Build.gradle Issue - RRutors
How to start a new activity on button click
Decompile APK Files: How to Get Source Code - RRutors Guide
What is the Different Between val and var in Kotlin?
How do I generate random numbers in Dart?
What are Android Versions available?
What is Application?
How to Use Deprecated Handler() in Android - RRutors Guide
How to check Android version?
How to reduce APK package size?
How to get screen size (width,height) in Android?
Set Activity to Fullscreen Mode in Android - RRutors
Fix Android Emulator Kill Error When Running Your App
Add Jar/Library Files as Dependency in Android Studio