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> 


저작자 표시 비영리 변경 금지
신고
크리에이티브 커먼즈 라이선스
Creative Commons License

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

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

댓글을 달아 주세요


티스토리 툴바