I've been having some problem recently.
I am making one application, where at the first screen, I have a button whose OnClickListener
displays a new screen or rather starts a new activity.
Also, I perform finish on the first activity so that the back button does not return me to the first screen.
Now, my problem is that... I am using Toast to show a particular message to the user.
But, because a new activity is started after that, the message I'm displaying dissappears IMMEDIATELY as a new
screen get's displayed.
So, what should be done to avoid this?
In what way, can I allow the Toast message to be displayed for long duration and start the new activity after the Toast message fades out ?
How can I delay the time between the showing of message and starting of activity?
I am posting my code here:
Note: I've tried using Thread.sleep but it does not help... It gives a delay, before showing the message.
I've even tried placing it at different positions, but still no luck.
The same problem also occurs when I try to do animation.
If I dont start the activity, then I can see the animation properly.
But when I insert the startActivity() part again, the animation is visible for a very VERY short duration of time
I need to somehow increase the duration between these operations OR find some other way to start new activity.
Please help me out soon.