I didn't find any solution regarding this problem in stack overflow that's why I am posting it here. I am creating radio buttons dynamically as follows.
RadioButton rb;
//generating radio buttons
for (int i = 0; i < 5; i++) {
rb = new RadioButton(this);
rb.setText(question.getOptions().get(i));
rb.setTextColor(getResources().getColor(R.color.rbTextColor));
rb.setId(i);
rg.addView(rb);
}
It's working perfectly fine but now I want to change the text size of the text of radio buttons through code which should be something like this an per my poor understanding.
rb.setTextSize(20);
but it's now working because radio button does not have this property. So please help me out how can I change the size of the text of the radio buttons in android?
Any help would be greatly appreciated.
Thanks,
momersaleem