Search code examples
androidselectordrawable

android drawable invalid start tag


I'm trying to set a tabhost selector, as i found an example demonstrating that i should create an xml file in drawable like this :

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/hotel_selected"
      android:state_selected="true" />
<item android:drawable="@drawable/hotel" />
</selector>

but when compiling, eclipse keep saying that it's an invalid start tag in this file.

please help me solve this.

many thanks.


Solution

  • Found a solution, I created the xml file by using a simple text editor (notepad++) and saved it to /res/drawable and compiled, result: it worked like a charm :)