@H_301_1@参见英文答案 >
toast issue in android3
我想检查烤面包是否已经被关闭,因为用户点击鼠标,烤面包片显示,但是可能我用户不断点击,所以我需要检查,我不能使用对话框
我想检查烤面包是否已经被关闭,因为用户点击鼠标,烤面包片显示,但是可能我用户不断点击,所以我需要检查,我不能使用对话框
解决方法
Toast toast = null; if (toast == null || toast.getView().getWindowVisibility() != View.VISIBLE) { toast = Toast.makeText(getApplicationContext(),"Text",Toast.LENGTH_SHORT); toast.show(); }
在再次显示之前,检查烤面包是否可见.