Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经运行了这个方法
sToast.cancel();
我可以调用这个方法吗
sToast.show();
我试过了。sToast 可以在 GB 中显示,但不能在 ICS 中显示。这样对吗?
根据文档,在 cancel() 之后调用 show() 不会在屏幕上显示任何 Toast。做正确的检查。
是的,您可以使用Toast.cancel(). 通常 Toast 会在超时后自行取消,因此程序员通常不会最终使用取消。如果有需要,您可以继续使用它。
Toast.cancel()