A partial shortcut wrap for this Github sample and this Github project.
This is Donation Ware and will expire on 29 April 2017 (donation = add additional features such as other colors, etc))
As "old school" as what I am you will need the following jars in your additional library folder (and I guess just about everyone has them there)
android-support-v4.jar
android-support-v7-appcompat.jar
android-support-v7-recyclerview.jar
It is quite a nice Calendar - you need to populate the events from within your B4A code.
I am using B4A version 6.50
I am using AppCompat V3.51 by @corwin42 (Thanks M)
Posting the following:
B4A sample project
B4A library files
You can find the remainder of the libs used (AppCompat V3.51) on the forum.
Extract folders DemoRes and LibRes and copy them to be on the same folder level as that of the B4A project's /Files and /Objects folders.
Sample Code:
This is Donation Ware and will expire on 29 April 2017 (donation = add additional features such as other colors, etc))
As "old school" as what I am you will need the following jars in your additional library folder (and I guess just about everyone has them there)
android-support-v4.jar
android-support-v7-appcompat.jar
android-support-v7-recyclerview.jar
It is quite a nice Calendar - you need to populate the events from within your B4A code.
I am using B4A version 6.50
I am using AppCompat V3.51 by @corwin42 (Thanks M)
Posting the following:
B4A sample project
B4A library files
You can find the remainder of the libs used (AppCompat V3.51) on the forum.
Extract folders DemoRes and LibRes and copy them to be on the same folder level as that of the B4A project's /Files and /Objects folders.
Sample Code:
B4X:
#Region Project Attributes
#ApplicationLabel: b4aDynamicCalendar
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#End Region
#AdditionalRes: ..\DemoRes
#AdditionalRes: ..\LibRes
#Region Activity Attributes
#FullScreen: True
#IncludeTitle: False
#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.
Dim dc As DynamicCalendar
Private Button1 As Button
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")
dc.Initialize("")
Dim dates() As String = Array As String("10-04-2017","15-04-2017", "16-04-2017", "19-04-2017", "18-04-2017", "24-04-2017")
Dim starttime() As String = Array As String("08:00", "08:00", "09:00", "10:00", "14:00", "15:00")
Dim endtime() As String = Array As String("08:30", "08:15", "09:25", "10:45", "14:55", "15:15")
Dim events() As String = Array As String("Safety Meeting", "Quality Meeting", "Supplier Meeting", "Customer Meeting", "IR Meeting", "Finance Meeting")
dc.addEvents(dates, starttime, endtime, events)
Dim holidays() As String = Array As String("14-04-2017", "17-04-2017", "25-12-2017", "26-12-2017", "01-01-2018")
dc.addHolidays(holidays)
dc.CalendarBackgroundColor = Colors.Green 'the color below the calendar when the Calendar Activity starts
dc.HeaderBackgroundColor = Colors.Cyan 'the background color of the 'banner' where the circles and arrows left/right appear
dc.HeaderTextColor = Colors.Black 'the color of the text in the 'banner' set in the above line of code
dc.WeekDayLayoutBackgroundColor = Colors.Yellow 'the background color of the banner where the day names appear
dc.NextPreviousIndicatorColor = Colors.Red 'the color of the circles and the arrows within them
dc.ExtraDatesOfMonthBackgroundColor = Colors.ARGB(50, 175, 0, 100)
dc.ExtraDatesOfMonthTextColor = Colors.Yellow
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
dc.startCalendar
End Sub