Dialog dialog = new Dialog(mContext){
public void dialog.setOnClickListener(OnClickListener() {
  public void onClick() {
      // Add something you want to do
  }
});

解决方案 »

  1.   

    如果上面不行的话,在你的类中实现DialogInterface.OnClickListener接口,重写onclick()函数就行了。
      

  2.   

    public abstract void onClick (DialogInterface dialog, int which)
    Since: API Level 1This method will be invoked when a button in the dialog is clicked.
    Parameters
    dialog  The dialog that received the click.
    which  The button that was clicked (e.g. BUTTON1) or the position of the item clicked. 
    不过这个还是来响应button的,实现不了你的要求
      

  3.   

    1楼的方法肯定是不行的 因为dialog没有setOnClickListener
    2楼实现DialogInterface.OnClickListener接口,重写onclick()函数?  不是我那样写的吗 应该怎么写       贴代码?  
      

  4.   

    实现DialogInterface.OnClickListener接口,override onClick函数,在activity中右键source code, override,选择要重写的函数public void onClick (DialogInterface dialog, int which) {// Add your own source code here
    }