Skip to content

Commit

Permalink
Major Changes in Code
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmmedrejowan committed Sep 17, 2022
1 parent 6be16f9 commit 02d4053
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ private void inits() {
binding.negativeText.setText(NEGATIVE_BUTTON_TEXT_DEFAULT);
binding.negativeText.setTextColor(NEGATIVE_BUTTON_TEXT_COLOR_DEFAULT);

// button click
binding.positiveButton.setOnClickListener(v -> {
dismiss();
});
binding.negativeButton.setOnClickListener(v -> {
dismiss();
});
binding.closeIcon.setOnClickListener(v -> {
dismiss();
});

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,6 @@ protected void onCreate(Bundle savedInstanceState) {
Button b = findViewById(R.id.button);
b.setOnClickListener(v -> {
new CuteDialog(this)
.isCancelable(true)
.setPositiveListener(v1 -> {
Toast.makeText(MainActivity.this, "Positive", Toast.LENGTH_SHORT).show();
})
.setNegativeListener(v2 -> {
Toast.makeText(MainActivity.this, "Negative", Toast.LENGTH_SHORT).show();
})
.setCloseListener(v3 -> {
Toast.makeText(MainActivity.this, "Dismiss", Toast.LENGTH_SHORT).show();
})
.show();

});
Expand Down

0 comments on commit 02d4053

Please sign in to comment.