How to set button click listener for Custom Dialog?

后端 未结 7 490
遇见更好的自我
遇见更好的自我 2021-01-11 11:30

I have made a main Dialog class on which I send the layout ID and shows the layout as a Dialog now when I send the layout from calling class it pop

7条回答
  •  情深已故
    2021-01-11 12:15

    I find that the code is clearer to seperate my click handlers. Add this in the onCreate method:

    signInbutton.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {
         // do stuff for signInButtonClick
      }
    });
    
    // same for other button
    

提交回复
热议问题