We can do this using looping through radioGroup children
for (int i = 0; i < radioGroup.getChildCount(); ++i) {
((RadioButton) radioGroup.getChildAt(i))
.setBackgroundResource(R.drawable.red_border);
}
This will loop through each and every children of RadioGroup and like this we can achieve the desired functionality