android - Creating dynamic controls -
I am trying to create a screen with some dynamic controls, to be accurate with the purpose of learning radio buttons well is.
I have been able to add radio buttons by referring to the radio group in the main group.
Radio Group RG = (radio group) searchWBIID (RID.price); Radiobutton RB = new radio button (this); Rb.setText ("some text!"); Rg.addView (RB);
I did not know how do I set the radio button ID?
If you want to use rb.setId () then this integer? I am trying to dynamically do the XML bits by default:
RB (Int) is how you will set the ID. You say "it wants an integer?" As you feel that sounds strange, what else would you expect?
Comments
Post a Comment