我怎样才能包括Toast通知按钮? [英] How can I include a button in a Toast notification?

查看:135
本文介绍了我怎样才能包括Toast通知按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我知道这已经被问过:安卓按键自定义吐司。 这几乎是完全相同的副本,但我认为这是值得的基础上,它一直在应用程序中使用的事实,一个新的问题,即对Gmail的ICS(当你删除一个消息出现)。

First of all, I know this has been asked before: Android : Button in custom Toast. This is nearly an exact duplicate, but I think that it warrants a new question based on the fact that it's been used in apps, namely Gmail for ICS (it appears when you delete a message).

链接的问题说,这是不可能包括在吐司,因为吐司一个按钮 s不能集中。这是错误的,过时的,还是Gmail中找到一个解决的方法?

The linked question says that it's not possible to include a button in a Toast because Toasts cannot be focused. Is this wrong, outdated, or did Gmail find a way around it?

推荐答案

Gmail的撤消酒吧岂不等于举杯,这里是谷歌是如何做的。

The Gmail undo bar is't a toast, here is how Google did it

<一个href="http://$c$c.google.com/p/romannurik-$c$c/source/browse/misc/undobar/src/com/example/android/undobar/UndoBarController.java">http://$c$c.google.com/p/romannurik-$c$c/source/browse/misc/undobar/src/com/example/android/undobar/UndoBarController.java

我想这回答了你的问题。

I guess this answers your question.

这篇关于我怎样才能包括Toast通知按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆