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());
How to reduce APK package size?
What is ANR in android?
How to save activity State in Android?
What are the notifications available in android?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
What is "shared preferences" in Android ?
What is Intent? What is the difference between an implicit intent and an explicit intent?
What is Android?
Hide/Disable soft keyboard on Activity launch: Android
What is ANR? How to avoid and resolve it?
Decompile APK Files: How to Get Source Code - RRutors Guide
What are Android Versions available?
How to install/ uninstall apk by command line ADB
How do I check in SQLite whether a table exists?
How to convert DP to Pixel and Pixel to Dp?
How to avoid multiple button click at same time in android?
Open PDF in Google Drive with Intent in Android - RRutors
ERR_ACCESS_DENIED in Android Webview with sdk 30
Key Points to remember while develop the Android Application.
FCM Not Receiving Notifications in Android - RRutors
Check List for Generate Signed APK Android
How can i comment inside xml file in android studio?
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
What is Application?
Add Jar/Library Files as Dependency in Android Studio
Permission denied for window type 2010 in Marshmallow device
How to check Android version?
What is Android Fragments?
How To Set Text Color Programmatically Android TextView?
How to stop EditText focus at Activity startup in Android?
Android Studio project R can't find
How to find Android Device UDID or unique ID?
What is the difference between match_parent and fill_parent?
What is NetworkOnMainThread Exception?
How to get a contact image using a phone number in android?
Explain Fragment Life Cycle
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
How to Use Deprecated Handler() in Android - RRutors Guide
Symmetric vs Asymmetric Encryption in Android Server - RRutors
What is the Different Between val and var in Kotlin?