Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

selector with android:drawable="@color/transparent" attribute

<!--  Active tab -->
<item android:state_selected="true" android:state_focused="false"
    android:state_pressed="false" android:drawable="@drawable/tab_bg_selected" />
<!--  Inactive tab -->
<item android:state_selected="false" android:state_focused="false"
    android:state_pressed="false" android:drawable="@drawable/tab_bg_unselected" />
<!--  Pressed tab -->
<item android:state_pressed="true" android:drawable="@color/transparent" />
<!--  Selected tab (using d-pad) -->
<item android:state_focused="true" android:state_selected="true"
    android:state_pressed="false" android:drawable="@color/transparent" />

is there a way to get the error in this kind of selector i want to use this kind o selector but i get an error in android:drawable="@color/transparent i get this error when i run it

enter image description here

i run out of ideas to do on make it work

like image 282
Giant Avatar asked Feb 10 '14 06:02

Giant


1 Answers

replace

android:drawable="@color/transparent"

with

android:drawable="@android:color/transparent"

You should refer to the android namespace

like image 55
Gopal Gopi Avatar answered Oct 07 '22 08:10

Gopal Gopi