📅  最后修改于: 2022-03-11 14:57:39.055000             🧑  作者: Mango
final Toast tst = Toast.makeText(ctx, "This is a toast.", Toast.LENGTH_SHORT);
tst.show();
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
tst.cancel();
tst.setText("Same toast with another message.");
tst.show();
}
}, 1000);