In my design of UI of Android applications, I need some drawables for icons.
Where are the existing drawables located within the Android SDK?
jpg , or . gif file. Android creates a Drawable resource for any of these files when you save them in the res/drawable/ directory. The filename is used as the resource ID.
In Android Studio inside the res folder, one can find the drawable folder, layout folder, mipmap folder, values folder, etc. Among them, the drawable folder contains the different types of images used for the development of the application.
In android.R.drawable
, read more here : http://docs.since2006.com/android/2.1-drawables.php
Simple resource usage :
android:icon="@android:drawable/ic_menu_save"
Simple Java usage :
myMenuItem.setIcon(android.R.drawable.ic_menu_save);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With