| | |
| | | import android.app.Dialog; |
| | | import android.view.Gravity; |
| | | import android.view.View; |
| | | import android.widget.Button; |
| | | import android.widget.TextView; |
| | | |
| | | import androidx.annotation.NonNull; |
| | |
| | | getWindow().setGravity(Gravity.CENTER); |
| | | setContentView(R.layout.confirm_dialog); |
| | | setCanceledOnTouchOutside(false); |
| | | TextView cannel = (TextView) this.findViewById(R.id.confirm_cancel); |
| | | TextView ok = (TextView) this.findViewById(R.id.confirm_ok); |
| | | Button cannel = (Button) this.findViewById(R.id.confirm_cancel); |
| | | Button ok = (Button) this.findViewById(R.id.confirm_ok); |
| | | cannel.setOnClickListener(v -> ConfirmDialog.this.dismiss()); |
| | | if (mListner == null) { |
| | | ok.setOnClickListener((View v) -> { |