I decided to write a test application. Faced such a task, how to change the text of RadioButton s to what I have in TXT in the assets folder?

I have already learned to parse the file, I can only output the data through ТextView , but with RadioButton problem in Google, as luck would have it, I cannot find anything.

PS I understand that no one will give ready-made solutions, tell me where to look for or what to do approximately, then I myself.

  • Do you have the text does not change? Or what exactly does not work? - Chubatiy
  • Show how you tried to change the text on the radio buttons. - Yuriy SPb

1 answer 1

It may sound strange, but RadioButton inherited from TextView . And to set text in RadioButton , you need to do the same with it as with TextView :

 radioButton.setText("radio button new text");