什么是吐司LENGTH_LONG和LENGTH_SHORT的时间 [英] What is the duration of a Toast LENGTH_LONG and LENGTH_SHORT

查看:310
本文介绍了什么是吐司LENGTH_LONG和LENGTH_SHORT的时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要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.

感谢

推荐答案

回答<一href="http://stackoverflow.com/questions/2220560/can-an-android-toast-be-longer-than-toast-length-long">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

这篇关于什么是吐司LENGTH_LONG和LENGTH_SHORT的时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆