Share My Creation Minimalistic Clock Widget

Here is my absolutely minimalistic clock widget. Written down in about one hour (or less). It shows just a simple digital clock with white numbers on a transparent background.

No configuration options, no other GUI, just the simple widget.

You can find the app in the market: AmberHome Minimalistic Clock

Meanwhile you can have a look at the source and see how simple this is!

The market version has two small changes:
1. the widget layout xml is modified to get the widget centered in its container.
2. The main activity is removed from the AndroidManifest.xml so that the app will not show in app drawer but is just available as a widget.
 

Attachments

  • screenshot-AHClock2.jpg
    screenshot-AHClock2.jpg
    11.5 KB · Views: 14,738
  • AHClock.zip
    5.7 KB · Views: 1,282
Last edited:

susu

Well-Known Member
Licensed User
Longtime User
Thanks for your sharing. It's simple but so beautiful.
On my phone the clock isn't exactly on center of the screen. Can you check it again?
 

corwin42

Expert
Licensed User
Longtime User
Unfortunately you have to edit the generated xml for the widget layout to center the clock correctly. This is not done in the provided example code. Currently it is not possible to make this directly in the B4A layout.

If you want to use it please install it from market. The market version is centered correctly.
 

susu

Well-Known Member
Licensed User
Longtime User
Thank you. The market version is working correctly :D
 

alfcen

Well-Known Member
Licensed User
Longtime User
Since B4A V 1.7 you can center a widget in ConfigureHomeWidget:

rv = ConfigureHomeWidget("l2x1", "rv", 120, "AmberHome Minimalistic Clock",True)
 

corwin42

Expert
Licensed User
Longtime User
Changed Source to V1.1 in first post.

If you make the small change mentioned by alfcen to the widget the widget will be centered correctly.
 
Top