开发者

How to return time from AnalogClock/DigitalClock in Android

开发者 https://www.devze.com 2022-12-20 08:31 出处:网络
I need to obtain time from my AnalogClock as a Stri开发者_运维问答ng and pass it as argument in a method. Wonder whats the method of AnalogClock to return current Time.

I need to obtain time from my AnalogClock as a Stri开发者_运维问答ng and pass it as argument in a method. Wonder whats the method of AnalogClock to return current Time.

Thank you.


AnalogClock widget doesn't have methods/properties for accessing the time. You need to create a new Date() object and then apply DateFormat.format method to it.


here the you can get it what you want i used it for my application for analog clock in my program you will get that i get the current time in string . you can click link for more in analog clock

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号