Change dialog button color

后端 未结 2 1399
暖寄归人
暖寄归人 2020-12-03 23:59

Is there any way how to change default dialog buttons colour, or do I need to do custom dialog for that?

This is my dialog:

private void removeItem(f         


        
2条回答
  •  孤街浪徒
    2020-12-04 00:59

    you can give style to your alert dialog like this:

    AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.AlertDialogStyle);
    

    And you can write this style in xml file like this:

    
    

提交回复
热议问题