Is there a simple way to add a divider between RadioButtons in a 
RadioGroup? I just want a thin line between the items in the group. I've 
tried using the "divider" xml attribute, and it had no effect.

In case it's relevant, the RadioGroup in my layout file is empty and I'm 
adding RadioButtons programmatically. That being the case, I also tried 
this ...

for (int i = 0; i < items.size(); i++) {

if (i > 0) {

View v = new View(this);

v.setLayoutParams(new RadioGroup.LayoutParams(LayoutParams.MATCH_PARENT, 
1));

v.setBackgroundColor(android.R.color.darker_gray);

mRadioGroup.addView(v)

}

/* Create and add RadioButton here */

}

... and it had no effect. To be more precise, the Views are present in the 
view hierarchy (they are showing up in Hierarchy Viewer), but for some 
reason they are not visible.

 

 

 

 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to