📜  如何使自定义吐司可见 20 秒 android - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:50.312000             🧑  作者: Mango

代码示例2
The values of LENGTH_SHORT and LENGTH_LONG are 0 and 1. This means they are treated as flags rather than actual durations so I don't think it will be possible to set the duration to anything other than these values.

If you want to display a message to the user for longer, consider a Status Bar Notification. Status Bar Notifications can be programmatically canceled when they are no longer relevant.