I would like to make a structure with the condition (if-else) RadioButton
I want that when the Radiobutton RB1 is selected, this function is ac
You can use switch like this:
XML Layout
And JAVA Activity
switch (RG.getCheckedRadioButtonId()) {
case R.id.R1:
regAuxiliar = ultimoRegistro;
case R.id.R2:
regAuxiliar = objRegistro;
default:
regAuxiliar = null; // none selected
}
You will also need to implement an onClick function with button or setOnCheckedChangeListener function to get required functionality.