Android-如何获得创建按钮的时间
Android - How to get the time of created button
当在布局中创建Button
(显示)时,Android中是否有任何功能,可以返回时间。我现在正在使用类似的东西,但是我不知道它返回的时间多么现实。
frameLay.addView(okButton,layoutParams);
Date date1 = new Date();
setTimeCreate(date1.getTime());
也许我可以使用C/C 中的一些功能。
ps:对不起,我的英语不是英语的母语
使用:
System.currentTimeMillis() - returns current time in milliseconds.
取决于所需的准确性级别,您可以使用这两个:
System.nanoTime()
System.currentTimeMillis()
相关文章:
- C++为构建时间获取QDateTime的可靠方法
- 从持续时间构造std::chrono::system_clock::time_point
- 问:如何使用C++中的按钮从窗口打开窗口
- 向量 <int> a {N, 0} 和 int arr a[N] = {0} 的时间复杂度有什么区别
- while循环中while循环的时间复杂度是多少
- 使用简单类型列表实现的指数编译时间.为什么
- 是否可以在编译时初始化数组,以便在运行时不会花费时间?
- 在已经使用Git的情况下减少编译时间
- 有没有一种方法可以创建一个带有哈希表的数据库,该哈希表具有恒定时间查找功能
- 如何将包含epoch时间的十六进制字符串转换为time_t
- 如何将点击的信号和插槽添加到qt中的自定义按钮中
- 从文本文件中读取时钟时间和事件时间并进行处理
- 具有未知值时的时间复杂性
- 问题:如何将某些按钮冻结一段特定的时间
- Android-如何获得创建按钮的时间
- 当按下按钮需要更长的时间时,窗口会变暗
- Windows API:为什么按钮悬停效果会在一段时间后卡住
- 如果通过按钮或时间更改执行,Maya API 的行为会有所不同
- 在对话框中禁用按钮控件需要一些时间
- 如何检查按钮按下的时间