AlertDialog does not show dividers on a list

前端 未结 2 975
庸人自扰
庸人自扰 2021-02-13 06:26

I have this class:

public class PageDetailInfoView extends FrameLayout {

//few constructors and methods

//method to show an AlertDialog with a list
private voi         


        
2条回答
  •  醉梦人生
    2021-02-13 06:55

    Change AlertDialog List items divider color as:

    AlertDialog alertDialogObject = dialogBuilder.create();
    ListView listView=alertDialogObject.getListView();  
    listView.setDivider(new ColorDrawable(Color.BLUE)); // set color
    listView.setDividerHeight(2); // set height 
    alertDialogObject.show();
    

提交回复
热议问题