在Android的警告对话框控件大小 [英] control size of alert dialog box in android

查看:100
本文介绍了在Android的警告对话框控件大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些code从我的活动之一在Android中显示一个警告对话框。

I have some code for displaying an alert dialog from one of my activities in Android.

AlertDialog.Builder builder = new AlertDialog.Builder(this);
    builder.setMessage("Message");
    builder.setCancelable(false)
            .setPositiveButton("Ok",
                    new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int id) {

                        }
                    });

    AlertDialog alert = builder.create();
    alert.setTitle("Title");
    alert.setIcon(R.drawable.your_image);      
    alert.show();  

现在我想改变对话框的大小。我该怎么办呢?

Now I would like to change the size of the dialog. How can I do that?

推荐答案

检查u能处理对话框大小的链接

check the link u can handle dialog size

http://developer.android.com/reference/android/应用程序/ AlertDialog.Builder.html

这篇关于在Android的警告对话框控件大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆