在 Android 上隐藏 Toast

编程入门 行业动态 更新时间:2024-10-27 02:23:56
本文介绍了在 Android 上隐藏 Toast的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我正在开发一个应用程序,该应用程序使用系统活动将联系人添加到手机内存中.此外部活动在保存联系人后启动 Toast.有没有可能摆脱它?如果我能得到它的引用以调用 cancel() 或取消所有排队的 Toast,那就太完美了.有 Toast 管理员吗?

I am developing an application that uses system activity to add a contact to phone's memory. This external activity launches a Toast after saving the contact. Is there any possibility to get rid of it? It would be perfect if I could get a reference to it to call cancel() or cancel all queued Toasts. Is there any Toast manager?

推荐答案

没有.如果您有对 Toast 的引用,您可以取消它,但由于它是由单独的活动创建的,因此您无法访问它.

No. You could cancel the Toast if you had a reference to it but since it is created by a separate activity you can't access it.

这篇关于在 Android 上隐藏 Toast的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 05:01:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1390154.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Android   Toast

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!