Changing font size into an AlertDialog

后端 未结 7 2209
广开言路
广开言路 2020-12-04 22:10

I am trying to put some loooong text into an AlertDialog. The only issue the default font size that is really too big, so I want to make it smaller.

Here are all the

7条回答
  •  自闭症患者
    2020-12-04 22:31

                   AlertDialog.Builder builder = new 
                    AlertDialog.Builder(YourActivity.this);
                    builder.setTitle("Your Title");
                    builder.setMessage("Your Message");
                    builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialogInterface, int i) {
                            // Your Positive Function
                        }
                    });
                    builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialogInterface, int i) {
                            // Your Negative Function
                        }
                    });
                    builder.show();
    

提交回复
热议问题