How do I set the time on an android analogue clock?

寵の児 提交于 2020-01-16 17:35:28

问题


I'm creating an android application that gets the current time in a different country/time-zone. I'm making it as there aren't many other apps on the marketplace that do the same job.

I've got an analogue clock with a digital clock underneath on my app, how do I change the time on the clocks - take on or off a number of hours? For example, I may want the clock to display the time in Florida, so for me that'd be -6 hours.

Although I'm proficient in other programming languages; mainly .NET I'm new to Java, so please excuse the simple questions!

Thankyou!


回答1:


The analog clock widget in android doesn't allow setting the time but you could adapt it as the source is available.




回答2:


If you are referring to android.widget.AnalogClock and android.widget.DigitalClock, they only show the current device time. They are not designed for showing arbitrary times, as you seek.



来源:https://stackoverflow.com/questions/4630490/how-do-i-set-the-time-on-an-android-analogue-clock

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!