我弄了个设置界面,用RadioButton设置了3个按钮
但是每次进去按钮都是灰的,怎么才可以弄成默认就选中(小绿点)
本人初学android,什么都不会,求教
xx.setChecked(true);
直接在layout.xml文件中这样写
Java code <RadioButton
android:id="@+id/radio1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello"
android:checked="true"/>