B4A Library [B4X] [XUI] AS Scheduler πŸ“… - MonthView, DayView (Week), AgendaView and CalendarView [Payware]

Alexander Stolte

Expert
Licensed User
Longtime User
This lib looks great.
Thats nice.
User displays his appointments in the view. (this lib obviously can do this)
Yes, the lib. can show your Appointments
User selects a date and time. (Does the lib let user select a cell and parses the date & time / or even better UnixTime for me?)
In the day view, you can click on a cell and get back the start and end time of the block.
In the month view, when you click on a day, you get back the day with the current time.
But you can also let the user enter a date and time through a dialog (not in the lib.) and just add this to the API.

So I end up having the Start Time of the Event. I then close the view again and continue with my code.
When you click on an appointment, you get back an "Appointment" object and there is a start and end.

Is this possible with this lib?
I do not know if I could answer your questions, since the lib. grows with its users, can talk about it if something is missing.
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.12
    • MonthView
      • BugFixes
    • ASSchedulerAPI
      • CreateAppointment - Return Type is now ASScheduler_Appointment and returns the inserted ID with the all other infos from the object
    • ASSchedulerUtils
      • Add InitializeAPI - Initializes the scheduler API
      • Add API - Now you have access to the Scheduler API everywhere in your project, even if there is no MonthView or DayView available.
ASSchedulerUtils
ASSchedulerUtils is an code module and can be called anywhere in the project.
B4X:
ASSchedulerUtils.InitializeAPI
ASSchedulerUtils.API.DeleteAppointment(1)
 

imbault

Well-Known Member
Licensed User
Longtime User
Donated
Transaction ID 4SA31450LE9301103

Very good Alexander
 

DaOel

Member
Licensed User
Longtime User
Especially the dayView looks very nice. I do a syncronization between Google Calendar and ASScheduler. For now it looks very promising. Thanks for the great work.
Would it be possible to also add the month in the header of the DayView?
It shows only the weekday and day number. For instance:
B4X:
Wed
30.

However you get easily lost when you scroll much and forget about what month is referenced.
So my suggestion
B4X:
Wed
30.03.

or

B4X:
Wed
30.Mar.
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.13
    • API
      • BugFixes
      • Add GetCustomQuery - Custom get query
        • Columns,Table,Where,Args
        • The Database structure you find here
    • DayView
      • BugFixes
      • Add Designer Property ShowMonthNames - Shows the Month name in the header
        • Default: False
        • As Value the MonthNameShort list is used
ShowMonthNames

GetCustomQuery
B4X:
ASScheduler_DayView1.API.GetCustomQuery("Appointments_Name,Appointments_Color","dt_Appointments","Appointments_isRecurring = 1",Array As String())
ASScheduler_DayView1.API.GetCustomQuery("Appointments_Name,Appointments_Color","dt_Appointments","Appointments_isRecurring = ?",Array As String(1))
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.14
    • API
      • GetAppointmentCountInRange if Parameter DurationLongerThanOneDay = True Then isFullDay = True are also returned
    • DayView
      • If Appointment isFullDay = True Then the appointment is displayed at the top
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.17
    • Utils
      • Add Type ASScheduler_Theme
    • DayView
      • BugFixes
      • A few properties added that were still missing
      • Add Designer Property GridLineColor - Color of the Grid lines
      • Add SetTheme - You can fast change the Appereance of the Scheduler
        • 2 Examples in the Description (DarkMode and LightMode)
        • Call RefreshScheduler if you want to commit the colors
The DayView example was adapted in the first post and now includes the DarkMode/LightMode button to change the theme.

Theming
Dark Mode Example:
Dim Theme As ASScheduler_Theme
Theme.Initialize

'Background Colors
Theme.BackgroundColor_Body = 0xFF202125
Theme.BackgroundColor_Header = 0xFF131416
Theme.BackgroundColor_Timeline = 0xFF131416
Theme.BackgroundColor_WeekNumber = xui.Color_ARGB(255,32, 33, 37)
Theme.BackgroundColor_GridLine = 0x64FFFFFF
Theme.BackgroundColor_Blackout = xui.Color_ARGB(152,255,255,255)
'Text Colors
Theme.TextColor_Header = xui.Color_White
Theme.TextColor_Timeline = xui.Color_White
Theme.TextColor_WeekNumber = xui.Color_White

ASScheduler_DayView1.SetTheme(Theme)
ASScheduler_DayView1.RefreshScheduler
Light Mode Example:
Dim Theme As ASScheduler_Theme
Theme.Initialize

'Background Colors
Theme.BackgroundColor_Body = xui.Color_White
Theme.BackgroundColor_Header = xui.Color_White
Theme.BackgroundColor_Timeline = xui.Color_White
Theme.BackgroundColor_WeekNumber = xui.Color_Gray
Theme.BackgroundColor_GridLine = xui.Color_ARGB(100,0,0,0)
Theme.BackgroundColor_Blackout = xui.Color_ARGB(152,0,0,0)
'Text Colors
Theme.TextColor_Header = xui.Color_Black
Theme.TextColor_Timeline = xui.Color_Black
Theme.TextColor_WeekNumber = xui.Color_Black

ASScheduler_DayView1.SetTheme(Theme)
ASScheduler_DayView1.RefreshScheduler
 

BluSky76

Member
Licensed User
Longtime User
Hi,
if i select i scroll forward i get these errors

java.lang.OutOfMemoryError: Failed to allocate a 16588812 byte allocation with 10170784 free bytes and 9MB until OOM

Error occurred on line: 992 (ASScheduler_DayView)...............
raiseEvent for xpnl_pagearea2_touch returned null
 

Alexander Stolte

Expert
Licensed User
Longtime User
By selecting a date higher than today, errors are obtained while there are no errors if you select a date lower than today.
I can not reproduce it.

You mean, if you use the function "Scroll2Date" in B4A and select a date e.g. 18.10.2022 then said error occurs?

I have tried it in release mode, debug mode, with different smartphones, I have not managed to crash the app with this error.

Stackoverflow says:
"OutOfMemoryError is the most common problem that occurs in android while especially dealing with bitmaps. This error is thrown by the Java Virtual Machine (JVM) when an object cannot be allocated due to lack of memory space and also, the garbage collector cannot free some space.

As mentioned by Aleksey, you can add the below entities in your manifest file android:hardwareAccelerated="false" , android:largeHeap="true" it will work for some environments."

That means, try to add the following to the manifest:
B4X:
SetApplicationAttribute(android:hardwareAccelerated, "false")
SetApplicationAttribute(android:largeHeap, "true")

I think the problem comes from the fact that I draw the lines for each page with canvas, then the problem should also occur when starting the app with you, because I do not do anything else than there with the function.
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.18
    • MonthView
    • Add Type ASScheduler_MonthView_DayProperties
      • TextColor
    • Add Designer Property GridLineColor - Color of the Grid lines
    • Add SetTheme - You can fast change the Appereance of the Scheduler
      • 2 Examples in the Description (DarkMode and LightMode)
      • Call RefreshScheduler and RefreshHeader if you want to commit the colors
The MonthView example was adapted in the first post and now includes the DarkMode/LightMode button to change the theme.


Dark Mode Example:
Dim Theme As ASScheduler_Theme
Theme.Initialize

'Background Colors
Theme.BackgroundColor_Body = 0xFF202125
Theme.BackgroundColor_Header = 0xFF131416
Theme.BackgroundColor_WeekNumber = xui.Color_ARGB(255,32, 33, 37)
Theme.BackgroundColor_GridLine = 0x64FFFFFF
Theme.BackgroundColor_Blackout = xui.Color_ARGB(152,255,255,255)
'Text Colors
Theme.TextColor_Header = xui.Color_White
Theme.TextColor_WeekNumber = xui.Color_White
Theme.TextColor_Day_MonthView = xui.Color_White

ASScheduler_DayView1.SetTheme(Theme)
ASScheduler_DayView1.RefreshScheduler
Light Mode Example:
Dim Theme As ASScheduler_Theme
Theme.Initialize

'Background Colors
Theme.BackgroundColor_Body = xui.Color_White
Theme.BackgroundColor_Header = xui.Color_White
Theme.BackgroundColor_Timeline = xui.Color_White
Theme.BackgroundColor_WeekNumber = xui.Color_Gray
Theme.BackgroundColor_GridLine = xui.Color_ARGB(100,0,0,0)
Theme.BackgroundColor_Blackout = xui.Color_ARGB(152,0,0,0)
'Text Colors
Theme.TextColor_Header = xui.Color_Black
Theme.TextColor_Timeline = xui.Color_Black
Theme.TextColor_WeekNumber = xui.Color_Black
Theme.TextColor_Day_MonthView = xui.Color_Black

ASScheduler_DayView1.SetTheme(Theme)
ASScheduler_DayView1.RefreshScheduler
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.19
    • DayView
      • BugFixes
      • Add Designer Property FullHourGridLinesHighlighting - The full hour is highlighted in the grid
        • Default: False
      • Add ShowGridLines to TimelineProperties - shows the grid lines in the timeline
        • Default: False
Left on the Timeline are TimelineProperties.ShowGridLines = True
With FullHourGridLinesHighlighting = True every new hour are thicker than the half hour
 

Alexander Stolte

Expert
Licensed User
Longtime User
Big Update
Update

  • 1.20
    • MonthView
      • Add Designer Property SchedulerFunction - You can switch between the normal calendar or a HeatMap
        • Default: Calendar
      • Add HeatMap - The HeatMap shows graphically how the load is on a day
      • Add Minimalism - Appointments are displayed as dots
      • New Blackout day drawing
    • DayView
      • Add NextWeek - Scrolls to the next page
      • Add PreviousWeek - Scrolls to the previous page
      • New Blackout day drawing
      • Add OverviewGap Property to ASScheduler_DayView_AppointmentProperties - If True then the appointments have a gap to the next appointment the next day
        • Default: True
        • Helps clarity
    • Utils
      • Add Type ASScheduler_HeatMapColor
        • Color - Count Color
        • Count - From which number should this color be displayed
        • TextColor - The text color for this heat level
    • API
      • Add GetAppointmentCountOnOneDay
      • Add Appointments_Description to the table
        • is not yet used by the scheduler for displaying
        • CreateASScheduler_Appointment and CreateASScheduler_AppointmentRecurring have a breaking change to add this property
All sample projects have been adapted to this version.
Breaking change on CreateASScheduler_Appointment and CreateASScheduler_AppointmentRecurring, you need to at a description parameter, that can be "" if you dont want a description.
New Blackout drawing


DayView - Appointment OverviewGap

MonthView - SchedulerFunction - HeatMap
On the heatmap you can see graphically how much workload there is on a given day. That is, whether there are many or few appointments on a day.
B4X:
    Dim HeatColor As List : HeatColor.Initialize
    HeatColor.Add(ASSchedulerUtils.CreateASScheduler_HeatMapColor(xui.Color_ARGB(255,214, 230, 133),0,xui.Color_White))
    HeatColor.Add(ASSchedulerUtils.CreateASScheduler_HeatMapColor(xui.Color_ARGB(255,140, 198, 101),2,xui.Color_White))
    HeatColor.Add(ASSchedulerUtils.CreateASScheduler_HeatMapColor(xui.Color_ARGB(255,68, 163, 64),4,xui.Color_White))
    HeatColor.Add(ASSchedulerUtils.CreateASScheduler_HeatMapColor(xui.Color_ARGB(255,30, 104, 35),7,xui.Color_White))
  
    ASScheduler_MonthView1.HeatMapProperties.ColorCountList = HeatColor
The "Count" specifies from which appointment number a certain color should be displayed.


MonthView - SchedulerFunction - Minimalism

In this function, you see all appointments as circles, the advantage of this is that you can use the scheduler on a small area. A example usecase will be added to the scheduler later.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…