A simple wrap for this Github project
Sure you will figure it out. Posting:
1. B4A sample project
2. B4A library files (jar and xml - copy them to your additional library folder
3. The java code (amended project and wrapper) - change it to your licking.
Touch the clock to change the colors
Sample B4A Code:
Library as it is at present:
DigitalClock
Author: Github: Damian Borecki, Wrapped by: Johan Schoeman
Version: 1
Sure you will figure it out. Posting:
1. B4A sample project
2. B4A library files (jar and xml - copy them to your additional library folder
3. The java code (amended project and wrapper) - change it to your licking.
Touch the clock to change the colors
Sample B4A Code:
B4X:
#Region Project Attributes
#ApplicationLabel: DigitalClock
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private dc1 As DigitalClock
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main")
Dim clkclr() As Int = Array As Int (Colors.Yellow, Colors.Green, Colors.Magenta, Colors.Cyan, Colors.Red)
dc1.ClockColors = clkclr
dc1.SelectedColorIndex = 0
dc1.ClockTextColor = Colors.White
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub dc1_clock_touched(newcolor As Int)
Log("newcolor = " & newcolor)
End Sub
Library as it is at present:
DigitalClock
Author: Github: Damian Borecki, Wrapped by: Johan Schoeman
Version: 1
- DigitalClock
Events:- clock_touched (newcolor As Int)
- DesignerCreateView (base As anywheresoftware.b4a.objects.PanelWrapper, lw As anywheresoftware.b4a.objects.LabelWrapper, props As anywheresoftware.b4a.objects.collections.Map) As void
- IsInitialized As boolean
- Initialize (ba As anywheresoftware.b4a.BA, EventName As java.lang.String) As void
- BringToFront As void
- SetLayout (arg0 As int, arg1 As int, arg2 As int, arg3 As int) As void
- SendToBack As void
- SetVisibleAnimated (arg0 As int, arg1 As boolean) As void
- RemoveView As void
- Invalidate3 (arg0 As int, arg1 As int, arg2 As int, arg3 As int) As void
- Invalidate2 (arg0 As android.graphics.Rect) As void
- SetColorAnimated (arg0 As int, arg1 As int, arg2 As int) As void
- SetBackgroundImageNew (arg0 As android.graphics.Bitmap) As anywheresoftware.b4a.objects.drawable.BitmapDrawable
- Invalidate As void
- SetLayoutAnimated (arg0 As int, arg1 As int, arg2 As int, arg3 As int, arg4 As int) As void
- RequestFocus As boolean
- ClockTextColor As int [write only]
- Left As int
- Background As android.graphics.drawable.Drawable
- Parent As java.lang.Object [read only]
- Color As int [write only]
- Enabled As boolean
- ClockColors As int[] [write only]
- Top As int
- Visible As boolean
- SelectedColorIndex As int [write only]
- Padding As int[]
- Height As int
- Tag As java.lang.Object
- Width As int