Date   startDate   =   new   Date(System.currentTimeMillis());

在收到设备返回数据之后添加如下语句:

Date   endDate   =   new   Date(System.currentTimeMillis());

long diff = endDate.getTime() - startDate.getTime();

然后在文本框中显示出来:

String sDiff = String.valueOf(AmoComActivity.Diff);  
((TextView) findViewById(R.id.edit_text)).setText(sDiff);

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
  • 2021-11-13
  • 2021-09-06
  • 2021-07-29
  • 2022-03-08
  • 2021-12-15
猜你喜欢
  • 2022-12-23
  • 2021-12-15
  • 2021-06-18
  • 2021-12-26
  • 2021-08-29
  • 2021-09-30
相关资源
相似解决方案