Have wrapped some additional functionality of this
Github project (although working it is not yet where it should be). Nevertheless, it would be interesting to know if it correctly shows the day/night time (sunrise/sunset) of where you are at present. Please post some pics of your display and if you don't mind state where you are and also if it represents your approximate sunrise/sunset times.
Library files (2 x Jar and 1 x Xml) are in the /files folder of the attached B4A project. Copy them to your additional libraries folder. You might have to enable the GPS of your device to get a current location in case you have been on the move. Else it will use your last known location.
The pic posted herewith is a very good representation of the sunrise/sunset times of where I am at present (i.e Durban, South Africa).
View attachment 35780
As it stands at present:
analog24hclock
Version: 1
- Analog24HClock
Fields:Methods:
- BringToFront
- DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
- Initialize (EventName As String)
- Invalidate
- Invalidate2 (arg0 As Rect)
- Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
- IsInitialized As Boolean
- RemoveView
- RequestFocus As Boolean
- SendToBack
- SetBackgroundImage (arg0 As Bitmap)
- SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
- SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
- SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
- SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
- setUsePassiveLocation
Properties:
- Background As Drawable
- Color As Int [write only]
- Enabled As Boolean
- Height As Int
- LargeFace As Boolean [write only]
True = large face will be used
False = small face will be used
- Left As Int
- Location As Location [write only]
- OverlayNightColor As Int [write only]
- OverlaySunColor As Int [write only]
- Scale As Float [write only]
- ShadeAlpha As Int [write only]
- ShowSeconds As Boolean [write only]
When set, the minute hand will move slightly based on the current number
of seconds. If false, the minute hand will snap to the minute ticks.
Note: there is no second hand, this only affects the minute hand.
- Tag As Object
- Time As Long [write only]
Set the time (pass long milliseconds value of B4A's DateTime.Now)
- Top As Int
- Visible As Boolean
- Width As Int