Android tutorial - android drawable|how to use drawable in android studio - android studio tutorial



 drawable resources xml file in android studio

What is Drawable Resource?

  • A drawable resource is a general concept for a graphic that can be drawn to the screen & which you can retrieve with APIs such as getDrawable(int) or apply to additional XML resource with attributes such as android:drawable & android:icon.
  • Drawable Resource XML is mostly created in drawable folder & which is used in Android to add more customization for views.
  • Below are the step by step procedure for, how to create new Drawable Resource XML in Android Studio.

How to Create Drawable Resource XML File in Android Studio:

  • Step 1:
  • Initially, Right Click on drawable as shown in figure below.
 right click on drawable
  • Step 2: Next Go to -> New > Drawable resource file as shown in figure below.
 new drawable resources
 new resource file
  • Step 4:
  • Following step 3, After that your drawable resource XML file will be created as shown in figure below.
 drawable xml file creation

Related Searches to how to use drawable in android studio