Toast Message in Android

荒凉一梦 提交于 2020-01-11 05:57:48

问题


Friends, In my application Toast message is Displayed in Activity say UserActivity.class..

That activity includes a button, in which it will Redirect to next Activity in OnClick of button..

What i want is that my Toast Message should display in UserActivity until user taps Button, if user Taps the button my toast message has to be Disappear and Next activity will appear..

Is it possible to do like this, if so how its possible?

Thanks Venkatesh.


回答1:


This is quite simple. Just call the cancel method on your ToastMessage as soon as you don't want to show the ToastMessage anymore. Refer Toast cancel()



来源:https://stackoverflow.com/questions/5309879/toast-message-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!