//防止多次点击,Toast重复显示
private Toast toast;
private void showToast(String msg) {
if (toast == null) {
toast = Toast.makeText(getApplicationContext(), msg,
Toast.LENGTH_SHORT);
} else {
toast.setText(msg);
}
toast.show();
}
//防止多次点击,Toast重复显示
private Toast toast;
private void showToast(String msg) {
if (toast == null) {
toast = Toast.makeText(getApplicationContext(), msg,
Toast.LENGTH_SHORT);
} else {
toast.setText(msg);
}
toast.show();
}