什么是吐司LENGTH_LONG和LENGTH_SHORT的时间吐司、时间、LENGTH_LONG、LENGTH_SHORT

由网友(尘事太揪人心)分享简介:我需要LENGTH_LONG和LENGTH_SHORT在毫秒(ms)的确切时间。此外,我需要知道,如果吐司消息LENGTH_LONG的持续时间也会有同样的时间在任何手机和任何API版本。I need the exact duration of LENGTH_LONG and LENGTH_SHORT in milli...

我需要LENGTH_LONG和LENGTH_SHORT在毫秒(ms)的确切时间。此外,我需要知道,如果吐司消息LENGTH_LONG的持续时间也会有同样的时间在任何手机和任何API版本。

I need the exact duration of LENGTH_LONG and LENGTH_SHORT in milliseconds (ms). Also I need to know if the duration of Toast message with LENGTH_LONG will have the same duration in any phone and with any API version.

是否有人知道哪里是时间界定?,我以毫秒为单位的意思是定义。我知道LENGTH_LONG一些INT常量值为1。但是我找不到哪里是实际持续时间定义的。

Does someone know where is the duration defined ?, I mean defined in ms . I know that LENGTH_LONG is some int const with value 1. But I could not find where is the actual duration defined.

感谢

推荐答案

回答here.就像你提到的 Toast.LENGTH_SHORT Toast.LENGTH_LONG 不在毫秒,但0或1。

Answered here. Like you mentioned Toast.LENGTH_SHORT and Toast.LENGTH_LONG are not in ms but 0 or 1.

实际的持续时间是:

private static final int LONG_DELAY = 3500; // 3.5 seconds
private static final int SHORT_DELAY = 2000; // 2 seconds
阅读全文

相关推荐

最新文章