文字被截断了?

时间:2016-04-01 03:38:11

标签: java android xml string performance

我试图用两个按钮显示一个警告对话框。但是,文本在第二个按钮中被切断:

  new AlertDialog.Builder(this)
            .setTitle("THIS IS MY TITLE")
            .setMessage("THIS IS MY MESSAGE")

            .setPositiveButton("Why Cutoff?", null)

            .setNegativeButton("This Shows Fully", null)

            .show();

正面按钮被切断,而负面按钮完全显示。我能同时显示两个按钮吗? 也许是将按钮叠加在一起?我只希望用户能够阅读我的文字。

谢谢,

Ruchir

1 个答案:

答案 0 :(得分:0)

使用自定义对话框。设计布局,如何显示对话框和按钮,并将布局设置为如下对话框

final Dialog dialog = new Dialog(context);
dialog.setContentView(R.layout.custom);

Checkout this示例以实现自定义对话框

相关问题