【问题标题】:android dialog alertandroid对话框警报
【发布时间】:2012-06-24 16:26:51
【问题描述】:

我是编程新手。如果有人愿意回答我的问题,真的很感激。 我在后面有一个旋转的画廊视图。但是当出现对话框警报时,是否可以使用任何方法来“冻结”画廊视图的旋转?

谢谢。

【问题讨论】:

    标签: android dialog alert


    【解决方案1】:
    AlertDialog.Builder builder1 = new AlertDialog.Builder(context);
                builder1.setMessage("Your message goes here.");
                builder1.setCancelable(true);
                builder1.setPositiveButton("Yes",
                        new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int id) {
                        dialog.cancel();
                    }
                });
                builder1.setNegativeButton("No",
                        new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int id) {
                        dialog.cancel();
                    }
                });
    
                AlertDialog alert11 = builder1.create();
                alert11.show();
    

    【讨论】:

      猜你喜欢
      • 2011-12-25
      • 2012-02-07
      • 2011-07-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多