create shape xml file in drawable folder in android studio

Abhishek Deshpande picture Abhishek Deshpande · Jul 17, 2015 · Viewed 62k times · Source

I am using Android studio 1.2.2 and need to know how to create a new shape file in drawable folder. I have already done the same in Eclipse but unable to do so in the android studio 1.2.2

Answer

Anirudh Sharma picture Anirudh Sharma · Jul 17, 2015

follow these steps

  1. create a drawable folder in res directory.(if not present)

  2. right click on drawable folder> New > Drawable resource file

  3. Give your file a name and change the root element to shape. (its selector by default)

now you are good to go.