So I have created a CRUD type of app where users fill in textfields and select options from a radio button and it must appear on the next page in a list.
I was able to validate textfields that users have entered and save them except the radio buttons. I need assistance with when the user selects option in the radio button that it must save and show in the list as the other ones.
I want when I click create button, the user selected option must be saved and be shown in the next page I created.
How can I achieve this with using radio buttons in android, thanks.
This is my code below how I declare the radio buttons.
rdgrp = view.findViewById(R.id.RadioGroup01);
malebutton = view.findViewById(R.id.malebutton);
femalebutton = view.findViewById(R.id.femalebutton);
On button click:
String strRadio = rdgrp.toString();
//where I display
strRadio.setText("");I get an error here