views:

87

answers:

0

Hi,

I have a TextView which has a drawable changes depends on state:

<TextView android:background="@drawable/textbackground"...>

And my textbackground.xml is

<selector>
<item android:state_focused="true" android:drawable="@drawable/highlightborder" />
</selector>

And highlightborder.xml is

<shape xmlns:android="http://schemas.android.com/apk/res/android"&gt; 
<stroke android:width="1dp" android:color="#FFFF0000" />
<solid android:color="@android:color/transparent"/>
</shape>

Now, how can I add an png to the background of TextView while should the highlightborder when it has focus?

Thank you.