Search
 
SCRIPT & CODE EXAMPLE
 

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);
Comment

PREVIOUS NEXT
Code Example
Java :: filter arraylist java 
Java :: reverse a integer in java 
Java :: create new empty list java 
Java :: java csv line split 
Java :: array to list java 
Java :: what does static mean java 
Java :: split number java 
Java :: java date minus 1 day 
Java :: on selected item changed listview javafx 
Java :: pivot in array 
Java :: How to find the prime factors of a number in Java? 
Java :: Add delay to code in Android 
Java :: navigate to another activity in android 
Java :: java array loop 
Java :: Simple gui in java 
Java :: arraylist syntax in java 
Java :: java convert date to localdate 
Java :: android kill other app programmatically by package 
Java :: useColorScheme returning light 
Java :: android studio change launcher icon 
Java :: java android edit text set value 
Java :: exception in thread "main" java.lang.indexoutofboundsexception: index 1 out of bounds for length 1 
Java :: diamond star pattern in java 
Java :: java run cmd 
Java :: Converting String Array to an Integer Array 
Java :: display in java 
Java :: throw error java 
Java :: java read a line of input 
Java :: insertion sort in java 
Java :: esponente in java 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =