2012-07-02 4 views

답변

2

당신은 당신이 당신의 체크 박스에 어떤 배경을 설정할 수 있습니다 radio.xmlcheck.setButtonDrawable(mContext.getResources().getDrawable( R.drawable.radio));

을 설정할 수 있습니다.

<item android:drawable="@drawable/option_unselected" android:state_checked="false"/> 
<item android:drawable="@drawable/option_selected" android:state_checked="true"/> 

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

여기 option_selected 및 선택 unslected 상태의 그래픽스 option_selected이다. 대한

더 당신이 radio.xml에서 체크 박스의 배경을 설정하는 방법

+0

http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList를 확인할 수 있습니다. 어떤 한 가지 예를 든다. –

+0

radio.xml 코드로 나의 대답을 편집했다. –

+0

예. 괜찮습니다. 그것은 눈금으로 변화하는 데 익숙합니다. 사각형 체크 박스 보어 색상 (확인란 색상의 윤곽선)으로 변경해야합니다. –

관련 문제