Android获取系统当前时间

方法实现:

 public static String getNowTime(){
        SimpleDateFormat simpleDateFormat=new SimpleDateFormat("HH:mm:ss");
        return simpleDateFormat.format(new Date());
    }

调用:

 tv_receive.setText(getNowTime());

猜你喜欢

转载自blog.csdn.net/m0_58241002/article/details/124961956