2017-05-16 9 views
-2

클릭했을 때 라디오 버튼의 원형 크기와 색상을 변경해야합니다. 그것은 아래 이미지와 같아야합니다. 몇 가지 아이디어가 있습니까? 감사합니다세트 사이즈 라디오 버튼 android

+0

어떤 코드를 만들

<RadioButton android:id="@+id/radio0" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/custom_drawable_toggle_background" android:button="@null" android:checked="true" android:text="RadioButton" /> 

하고 당김에 당신은 시도? 작동하지 않는 것은 무엇입니까? – Arcath

답변

1

당신은 예를 들어 라디오 버튼에 대한 사용자 지정 당김 배경을 사용하려고 할 수 있습니다 -이 당신의 custom_drawable_toggle_background.xml

<?xml version="1.0" encoding="utf-8"?> 
<selector xmlns:android="http://schemas.android.com/apk/res/android"> 

<item android:drawable="@drawable/custom_drawable_background_selected" android:state_checked="true"/> 
<item android:drawable="@drawable/custom_drawable_background_unselected" android:state_checked="false"/> 

</selector> 
관련 문제