-2

I'm creating an app, which can show the times of different cities. I have an api which takes coordinates and gives me something like - America/Chicago. But I want to show this on a Digital Clock. Can someone please tell me how to change the timezone of a DigitalClock, or make a custom one. I have no clue! Thanks for the help!

user2300851
  • 127
  • 1
  • 8

2 Answers2

0

Do you mean by like a digital clock as in a widget? You're going to need to give more information about it.

You can try doing a textview in an activity and set it to change every minute or hour by getting the time from this class from Android API.

  • Yes, I want to do something like that - the textview. But, I want it to update every second. I tried to do that, but my app keeps freezing – user2300851 Jul 10 '14 at 22:00
  • Ideally,you should use Observable pattern for solving this type of problems..extend your model class with BaseObservable and then using appropriate techniques you can update your UI whenever the model changes.Learn more about android data binding – ashif-ismail Sep 09 '16 at 12:06
0

Android: DigitalClock remove seconds

customized digital clock in android

I assume you can then work out how much time to add/subtract from the system's time to show the destination's time.

Community
  • 1
  • 1
AndrewNR
  • 134
  • 1
  • 2
  • 13