This Pull Request is a continuation of a Work In Progress for an Issue that I’ve already worked in one of my previous PRs. So please read it if you’re unfamiliar with it! If not, here’s a quick summary of the work: a clock widget that displays time according to the timezone that the user picked for it and have it available in digital and analog(jeez, who still uses analog clock in a mobile device nowadays?!) graphical presentations. As I’ve already laid out the barebones and the starting point for it in my previous PR, I’ve decided to continue where I left off – this time my goal was to properly fix the UI of the widget, add the timezone display (i.e. GMT +00) and the current date in that timezone.
Since my main objectives were clearly defined, I knew exactly what files I needed to work with –
ClockWidgetActivity.java, I merely needed to add snippets of code that would make sure that once the widget is created, it will display the current date and local timezone of the device:
However, this was only concerned with the logic layer of the widget, now I needed to get working with the presentation layer which is
Well, to put it simply, I made the font text white. You’ll be surprised at how much difference that can make on the readability of a widget in a home screen:
As you can see, now it looks prim and proper. Nothing too fancy – just a simple clock widget that tells the time, timezone, and date.