It wraps this Github project. Posting the following:
1. B4A sample project
2. B4A library files (copy them to your additional library folder)
Sample code:
The library:
DialTimePicker
Author: Github: Ugur Tekbas, Wrapped by: Johan Schoeman
Version: 1
1. B4A sample project
2. B4A library files (copy them to your additional library folder)
Sample code:
B4X:
#Region Project Attributes
#ApplicationLabel: DialTimePicker
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: landscape
#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 dtp1 As DialTimePicker
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")
dtp1.HourFormat24 = False
dtp1.CanvasColor = Colors.Transparent
dtp1.TextColor = Colors.Yellow
dtp1.DialColor = Colors.Blue
dtp1.ClockColor = Colors.Red
End Sub
Sub Activity_Resume
dtp1.setFirstTime
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub dtp1_time_changed(hr As Int, minute As Int, AmPm As String)
Log("hour = " & hr)
Log("minute = " & minute)
Log("AM PM = " & AmPm)
End Sub
The library:
DialTimePicker
Author: Github: Ugur Tekbas, Wrapped by: Johan Schoeman
Version: 1
- DialTimePicker
Events:- time_changed (hr As Int, minute As Int, AmPm As String)
- ba As BA
- 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)
- disableTouch (disableTouch As Boolean)
- setFirstTime
- AmPM As String [read only]
- Background As Drawable
- CanvasColor As Int [write only]
- ClockColor As Int [write only]
- Color As Int [write only]
- CurrentHour As Int [read only]
- CurrentMin As Int [read only]
- DialColor As Int [write only]
- Enabled As Boolean
- Height As Int
- HourFormat24 As Boolean [write only]
- Left As Int
- Tag As Object
- TextColor As Int [write only]
- Top As Int
- Visible As Boolean
- Width As Int
Attachments
Last edited: