Toast.matkText才会创建一个新的实例
private Toast toast = null; private void checkToastResult() { if (toast != null) { toast.setText("没有搜索结果"); toast.setDuration(Toast.LENGTH_SHORT); } else { toast = Toast.makeText(context, "没有搜索结果", Toast.LENGTH_SHORT); } toast.show(); }