Aug 31, 2011 Replies: 6 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 11.5 KB · Views: 15,256 AHClock.zip AHClock.zip 5.7 KB · Views: 1,610 Last edited: Oct 31, 2011 Click to expand...
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.
S susu Well-Known Member Licensed User Longtime User Sep 6, 2011 #2 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?
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 Sep 6, 2011 #3 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.
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.
S susu Well-Known Member Licensed User Longtime User Sep 13, 2011 #4 Thank you. The market version is working correctly
alfcen Well-Known Member Licensed User Longtime User Oct 28, 2011 #6 Since B4A V 1.7 you can center a widget in ConfigureHomeWidget: rv = ConfigureHomeWidget("l2x1", "rv", 120, "AmberHome Minimalistic Clock",True)
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 Oct 31, 2011 #7 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.
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.