What is the difference between these three xml files in android?
xml file with selector as root element
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<Further Designing ... />
...
</shape>
</item>
</selector>
xml file with shape as root element
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<Further Designing ... />
...
</shape>
xml file with layer-list as root element
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<Further Designing ... />
...
</shape>
</item>
<item android:bottom="1dp">
<shape android:shape="rectangle">
<Further Designing ... />
...
</shape>
</item>
</layer-list>
Which one is used in which case. A little examples will be more appreciated. Thanks!!!