android RadioButton怎么设置默认选中

2025-02-24 15:24:30
推荐回答(1个)
回答1:

直接在layout.xml文件中这样写
Java code?1
android:id="@+id/radio1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello"
android:checked="true"/>

就OK了