Toast toast = null; if (toast == null || toast.getView().getWindowVisibility() != View.VISIBLE) { toast = Toast.makeText(getApplicationContext(),"Text",Toast.LENGTH_SHORT); toast.show(); }
在再次显示之前,检查烤面包是否可见.