http://developer.android.com/guide/topics/resources/color-list-resource.html



<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
   
<item
       
android:color="hex_color"
       
android:state_pressed=["true" | "false"]
       
android:state_focused=["true" | "false"]
       
android:state_selected=["true" | "false"]
       
android:state_checkable=["true" | "false"]
       
android:state_checked=["true" | "false"]
       
android:state_enabled=["true" | "false"]
       
android:state_window_focused=["true" | "false"] />
</selector>



<?xml version="1.0" encoding="utf-8"?>

<selector xmlns:android="http://schemas.android.com/apk/res/android">   

<item android:state_focused="true" android:state_pressed="false" android:drawable="@drawable/focused_image" />

<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/pressed_image" />

<item android:drawable="@drawable/normal_image" />

</selector> 


'programmer > android' 카테고리의 다른 글

gridview spacing  (0) 2013.06.11
clickable view highlight setting  (0) 2013.06.11
Dialog softkeyboard  (0) 2013.06.10
apache 압축 라이브러리를 이용한 압축 클래스  (0) 2013.05.29
HorizontalListView  (0) 2013.05.28

+ Recent posts