I have this class:
public class PageDetailInfoView extends FrameLayout {
//few constructors and methods
//method to show an AlertDialog with a list
private void openDialog(){
List<String> mTags = new ArrayList<String>();
mTags.add("Item1");
mTags.add("Item2");
mTags.add("Item3");
mTags.add("Item4");
mTags.add("Item5");
mTags.add("Item6");
final CharSequence[] tags = mTags.toArray(new String[mTags.size()]);
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
builder.setTitle("Title");
builder.setItems(tags, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
//do something
}
});
Dialog alertDialogObject = builder.create();
alertDialogObject.show();
}
The Alert dialog is opened after invoke openDialog() but the thing is that it does not exhibit the dividers between items.
I would like to get this:
http://2.bp.blogspot.com/-i00d8VG6WsQ/UrGIeyb-8II/AAAAAAAAHwA/8MPWP5qrQ78/s500/alertdialog-with-simple-listview.png
and ,in fact, I get it but without the Gray dividers.
Any idea about why?