dialog在设置的时候需要和自定义的那个view进行关联,如果按钮所在的父视图view没有和dialog的builder进行关联,那么你对按钮的监听就不会产生

    private AlertDialog.Builder getDialogView(View view) {
        AlertDialog.Builder builder = new AlertDialog.Builder(this);  
        builder.setView(view);  // 这里这个view需要时我们按钮所对应的那个父视图view
        return builder;
    }

 

相关文章:

  • 2021-12-04
  • 2021-06-30
  • 2022-01-26
  • 2021-10-28
  • 2022-02-11
  • 2022-01-18
  • 2022-01-06
  • 2021-06-01
猜你喜欢
  • 2021-07-11
  • 2021-09-17
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-08-08
相关资源
相似解决方案