我怎样才能包括Toast通知按钮?按钮、通知、Toast

2023-09-03 17:49:46 作者:帥到没朋友

首先,我知道这已经被问过:安卓按键自定义吐司。 这几乎是完全相同的副本,但我认为这是值得的基础上,它一直在应用程序中使用的事实,一个新的问题,即对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

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.