Finish activity after toast message disappears?

前端 未结 12 1092

Does anybody know, if there is a possibility to do something (in my case finish activity) on toast message will be closed?

12条回答
  •  伪装坚强ぢ
    2020-12-01 11:11

    Afaik the INotificationManager API (which is used under the hood of the toast class) does not have any support for notifying the caller when it closes the Toast.

    There's also no way to check if the Toast is showing or hidden without using reflection to pick out the inner class that represents the transient notification.

提交回复
热议问题