how to prevent multiple toasts from coming together android code example
Example: how to stop toast message from overlapping
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);