I’m using this code to dynamically create new RadioButton in Android:
RadioButton radioButton = new RadioButton(getBaseContext());
radioButton.setText("test text");
radioGroup.addView(radioButton);
I need to set RadioButton properties “android:button”, “android:minWidth” and “android:textAppearance” in code (not in xml), before adding radioButton to radio group.
You should be able to use setButtonDrawable(), setMinWidth() and setTextAppearance().
Refer to http://developer.android.com/reference/android/widget/CompoundButton.html and http://developer.android.com/reference/android/widget/TextView.html.