How can I include a button in a Toast notification?

后端 未结 5 1900
广开言路
广开言路 2020-12-12 23:05

First of all, I know this has been asked before: Button in custom Android Toast?. This is nearly an exact duplicate, but I think that it warrants a new question based on the

5条回答
  •  孤城傲影
    2020-12-12 23:31

    What you're referring to is not a Toast but what Google has dubbed a Snackbar. See the Material Design guidelines.

    You can find several implementations of this on GitHub. Some also go by the name of UndoBar

    Currently, the most extensive, popular, and active one seems to be Snackbar by nispok, which I also happen to be using.

提交回复
热议问题