我如何给这个广播组提供按钮色调,我的xml中只有一个组中没有单选按钮

时间:2017-09-05 13:57:29

标签: android

如何设置此收音机组的按钮色调

 RadioGroup rg = (RadioGroup) view.findViewById(R.id.radiogroup);
    RadioButton[] rb = new RadioButton[answerOption.size()];

    for (int i = 0; i < answerOption.size(); i++) {
        rb[i] = new RadioButton(getContext());

        rg.addView(rb[i]);
        rb[i].setText(answerOption.get(i).trim());
    }

1 个答案:

答案 0 :(得分:1)

rb[i].setButtonTintList(ColorStateList.valueOf(Color.BLUE));