With Resources.getIdentifier() method we can get the resource id by its name. If we know drawable name then we can get drawable id by If we know color name then we can get color id by
int resId = getResources().getIdentifier("Name of Resource", "drawable", mApplicationContext.getPackageName());
int resId = getResources().getIdentifier("Name of Resource", "color", mApplicationContext.getPackageName());
Decompile APK Files: How to Get Source Code - RRutors Guide
How to validate email address in Android with Kotlin?
What is Android?
How do i load image from drawable folder in Jetpack Compose?
Android Studio project R can't find
How to copy database from assets folder in android using kotlin
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
How to save activity State in Android?
Explain Fragment Life Cycle
Symmetric vs Asymmetric Encryption in Android Server - RRutors
How do I check in SQLite whether a table exists?
What is NetworkOnMainThread Exception?
How to find Android Device UDID or unique ID?
How to stop EditText focus at Activity startup in Android?
Extract Date and Time from Long Type Variable - RRutors
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
How to avoid multiple button click at same time in android?
What are Android Versions available?
Fix Android Emulator Kill Error When Running Your App
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
How to Get bitmap from drawable: Android
Permission denied for window type 2010 in Marshmallow device
How to start a new activity on button click
What is Application?
How can i comment inside xml file in android studio?
Key Points to remember while develop the Android Application.
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
How To Set Text Color Programmatically Android TextView?
How to check Android version?
How to get a contact image using a phone number in android?
Check List for Generate Signed APK Android
Add Jar/Library Files as Dependency in Android Studio
What is "shared preferences" in Android ?
How to Exit android app on back pressed?
What is Android Fragments?
What is the Different Between val and var in Kotlin?
What is Context?
Open PDF in Google Drive with Intent in Android - RRutors
How to convert milli seconds to hours, minutes and seconds in Android?
How to Generate signed apk with android studio