开发者

control size of alert dialog box in 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() {
       开发者_C百科                 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?


check the link u can handle dialog size

http://developer.android.com/reference/android/app/AlertDialog.Builder.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜