Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to set radio button checked in android programmatically

In your layout you can add android:checked="true" to CheckBox you want to be selected.

Or programmatically, you can use the setChecked method defined in the checkable interface:

RadioButton b = (RadioButton) findViewById(R.id.option1);
b.setChecked(true);
 
PREVIOUS NEXT
Tagged: #set #radio #button #checked #android #programmatically
ADD COMMENT
Topic
Name
9+4 =