开发者

How to return time from AnalogClock/DigitalClock in Android

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜