如何在对话框上设置不可点击的区域?

时间:2019-02-23 11:42:21

标签: android dialog click

我只想设置单击该tic,我想设置不可复制的另一面。该怎么办?

readyPopupDialog = new Dialog(this);
readyPopupDialog.setContentView(R.layout.custom_popup_game_ready); 
readyPopupDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
readyPopupDialog.show();

enter image description here

1 个答案:

答案 0 :(得分:0)

我认为您可以使用这些:

readyPopupDialog.setCancelable(true);
readyPopupDialog.setCanceledOnTouchOutside(true);