How can I include a button in a Toast notification?

后端 未结 5 1905
广开言路
广开言路 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:27

    If you want a button in a toast, its better you quit that idea. But you can use dialogs in place of toast. Using dailogs, you will be able to display whatever you want (same function as a toast would do). Also in the dailog, you could set buttons.

提交回复
热议问题