Search in sources :

Example 1 with AppCompatRadioButton

use of androidx.appcompat.widget.AppCompatRadioButton in project J2ME-Loader by nikita36078.

the class ChoiceGroup method initButtonGroup.

private void initButtonGroup() {
    buttongroup.setOrientation(LinearLayout.VERTICAL);
    Context context = getOwnerForm().getParentActivity();
    int size = selected.size();
    if (buttongroup instanceof RadioGroup) {
        for (int i = 0; i < size; i++) {
            addButton(new AppCompatRadioButton(context), i, strings.get(i), images.get(i), selected.get(i));
        }
    } else {
        for (int i = 0; i < size; i++) {
            addButton(new AppCompatCheckBox(context), i, strings.get(i), images.get(i), selected.get(i));
        }
    }
}
Also used : Context(android.content.Context) AppCompatRadioButton(androidx.appcompat.widget.AppCompatRadioButton) RadioGroup(android.widget.RadioGroup) AppCompatCheckBox(androidx.appcompat.widget.AppCompatCheckBox)

Aggregations

Context (android.content.Context)1 RadioGroup (android.widget.RadioGroup)1 AppCompatCheckBox (androidx.appcompat.widget.AppCompatCheckBox)1 AppCompatRadioButton (androidx.appcompat.widget.AppCompatRadioButton)1