Reputation: 257
So, on this app I am making, I have a radio group set up, and what I want to do is make a Textview and an EditText appear under the radio group when it when one of the radio buttons are selected. How would I go about making that happen?
Thank you for your time.
Upvotes: 0
Views: 68
Reputation: 18762
Use setOnCheckedChangeListener method
radioButton.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) {
//make TextView & Edit Text visible
} else {
//Hide the TextView and EditText
}
}
});
Upvotes: 1