title: How to make a selector in Android Studio
body: <p>While taking a course, I was instructed to make an xml selector for a Button. The course said to make a new Android xml in Eclipse, but i am using Android Studio.</p>
  <p>Also when I custom write the code it gives me an error. It says &quot;element selector must be declared&quot;.</p>
  <p><img src="https://i.stack.imgur.com/Hf4cz.png" alt="as you can see selector is an error" /></p>
  <p>Got code from here: <a href="https://stackoverflow.com/questions/5624609/android-how-to-make-a-drawable-selector">Android: How to Make A Drawable Selector</a>.</p>
  <p>Does anyone know how to do this in Android Studio?</p>