开发者

control size of alert dialog box in android

开发者 https://www.devze.com 2023-01-26 05:41 出处:网络
I have some code for displaying an alert dialog from one of my activities in Android. AlertDialog.Builder builder = new AlertDialog.Builder(this);

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

精彩评论

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