sorry for my bad English.
i want show two toast in order, in other word when first toast duration is over second toast appear.
this is my code :
Toast.makeText(this, "Toast1", Toast.LENGTH_SHORT).show();
Toast.makeText(this, "Toast2", Toast.LENGTH_SHORT).show();
but only second toast message will appear. i think when show method of second toast will execute it will cancel previous toast (first toast)
I solved my problem with this code :
Toast.makeText(this, "Toast1", Toast.LENGTH_SHORT).show();
Handler handler =new Handler();
handler.postDelayed(new Runnable()
{
@Override
public void run()
{
Toast.makeText(MainActivity.this, "Toast2", Toast.LENGTH_SHORT).show();
}
},1000);
but is there any easier solution?