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

DBernaert

Member
Licensed User
Hi,

Thx for the feedback.
I can indeed change the background, ...
But i can't find how to change the color of the labels for the months, days, ... (see attachment).
Could you please let me know how this can be done?

 

DBernaert

Member
Licensed User
I'm also having a problem porting the code from B4A to B4I.
I created the forms in B4I just like in B4A and added the code that is specific for B4I (B4XPage_Resize)
When running the application it crashes, this is the error stack:



Any idea what would cause this?

Thank you.
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 3.08
    • AgendaView
      • Theming BugFixes
      • Add SetTheme - You now have all the colors for the view in one function
      • Add 2 Examples for SetTheme
        • Theme_Dark
        • Theme_Light
      • Add get isCreated - Returns true after you call CreateScheduler
SetTheme
B4X:
Private Sub Theme_Dark
    
    Dim Theme As ASScheduler_AgendaView_Theme
    Theme.Initialize
    Theme.BackgroundColor_Body = xui.Color_ARGB(255,32, 33, 37)
    Theme.BackgroundColor_Week = xui.Color_ARGB(255,32, 33, 37)
    Theme.BackgroundColor_Month = xui.Color_ARGB(255,19, 20, 22)
    Theme.BackgroundColor_CurrentDate = xui.Color_ARGB(255,45, 136, 121)
    Theme.BackgroundColor_EmptyState = xui.Color_ARGB(255,32, 33, 37)
    
    Theme.TextColor_Appointment = xui.Color_White
    Theme.TextColor_AppointmentDayOfMonth = xui.Color_White
    Theme.TextColor_AppointmentWeekDay = xui.Color_White
    Theme.TextColor_DayOfMonth = xui.Color_White
    Theme.TextColor_EmptyState = xui.Color_White
    Theme.TextColor_Month = xui.Color_White
    Theme.TextColor_Week = xui.Color_White
    
    ASScheduler_AgendaView1.SetTheme(Theme)
    If ASScheduler_AgendaView1.isCreated Then ASScheduler_AgendaView1.RefreshScheduler
    
End Sub

Private Sub Theme_Light
    
    Dim Theme As ASScheduler_AgendaView_Theme
    Theme.Initialize
    Theme.BackgroundColor_Body = xui.Color_White
    Theme.BackgroundColor_Week = xui.Color_White
    Theme.BackgroundColor_Month = xui.Color_ARGB(255,230, 230, 230)
    Theme.BackgroundColor_CurrentDate = xui.Color_ARGB(255,45, 136, 121)
    Theme.BackgroundColor_EmptyState = xui.Color_White
    
    Theme.TextColor_Appointment = xui.Color_White
    Theme.TextColor_AppointmentDayOfMonth = xui.Color_Black
    Theme.TextColor_AppointmentWeekDay = xui.Color_Black
    Theme.TextColor_DayOfMonth = xui.Color_Black
    Theme.TextColor_EmptyState = xui.Color_Black
    Theme.TextColor_Month = xui.Color_Black
    Theme.TextColor_Week = xui.Color_Black
    
    ASScheduler_AgendaView1.SetTheme(Theme)
    If ASScheduler_AgendaView1.isCreated Then ASScheduler_AgendaView1.RefreshScheduler
    
End Sub

I created the forms in B4I just like in B4A and added the code that is specific for B4I (B4XPage_Resize)
what code do you have in the resize event?
But i can't find how to change the color of the labels for the months, days, ... (see attachment).
Use the new SetTheme functions, Dark and Light examples are above.
 

DBernaert

Member
Licensed User
In the resize event i have the following code:
B4X:
If Width < Height Then
        AgendaView.mBase.SetLayoutAnimated(0,0,0,Width,Height)
    Else
        AgendaView.mBase.SetLayoutAnimated(0,B4XPages.GetNativeParent(Me).SafeAreaInsets.Left,0,Width - B4XPages.GetNativeParent(Me).SafeAreaInsets.Left,Height)
    End If
 

vfafou

Well-Known Member
Licensed User
Longtime User
Hello!
After updating the libraries AS Scheduler, ASViewPager and adding jPager, I have a problem when I try to run my app.
The problem is:

Error description: Unknown member: customlistview
Error occurred on line: 1275
Dim xpnl_background As B4XView = xASVP_Horizontal.CustomListView.GetPanel(i)
Word: customlistview

Additionally, Logs section refers the following:

B4X:
Syntax error.
'next' expected.
Unknown member: tag
Unknown member: getview
Unknown member: numberofviews
Unknown member: getview
Unknown member: numberofviews
Unknown member: customlistview

I can't understand which lib has this code and I don't want to unzip the b4xlib for ethical reasons!

May somebody (mainly Alex) could help?
 
Last edited:

Alexander Stolte

Expert
Licensed User
Longtime User
Error description: Unknown member: customlistview
Error occurred on line: 1275
Dim xpnl_background As B4XView = xASVP_Horizontal.CustomListView.GetPanel(i)
Word: customlistview
Are you sure you have replaced all libraries? Please look in the libraries manager and see if the online versions match. All libraries have been converted to the new AS_ViewPager version since the beginning of the year without any problems. Therefore it could only be a mistake when replacing it.
 

vfafou

Well-Known Member
Licensed User
Longtime User
It was a "forgotten" ASCalendarAdvanced! I replaced with ASScheduler_CalendarViewMonth and the error disappeared!
 

Alexander Stolte

Expert
Licensed User
Longtime User
ASCalendarAdvanced
 

MarcoRome

Expert
Licensed User
Longtime User
Hi dear @Alexander Stolte
If there are appointments every half hour
example
from 08.00 to 08.30
from 08.30 to 09.00
from 09.00 to 09.30
etc.
It happens that the text is formatted like this:




B4X:
Dim BeginTime As Long = DateUtils.SetDate(DateTime.GetYear(DateTime.Now),DateTime.GetMonth(DateTime.Now),DateTime.GetDayOfMonth(DateTime.Now)) + DateTime.TicksPerHour*8
        
        For i = 0 To 5
            
            
            Log(DateTime.Time(BeginTime))
            
            ASScheduler_DayView1.API.CreateAppointment(ASSchedulerUtils.CreateASScheduler_Appointment(0,$"Test ${i}"$,"Description",xui.Color_ARGB(255,45, 136, 121),False,BeginTime,BeginTime + DateTime.TicksPerMinute * 30))
            
            BeginTime = BeginTime + DateTime.TicksPerMinute * 30
            
            
        Next
    
        ASScheduler_DayView1.RefreshScheduler

if instead a one minute gap is followed by this instruction

B4X:
 BeginTime = BeginTime + DateTime.TicksPerMinute * 31



Any solution ?
In attachment example
 

Attachments

  • Project.zip
    184.3 KB · Views: 54

MarcoRome

Expert
Licensed User
Longtime User
Hi dear @Alexander Stolte, All.

B4X:
ASSchedulerUtils.API.DeleteBlackout(id)

I should remove a blackout.
First question:
It asks me for ID. How can I get the ID?

Next question:
When I click on blackout the event ASScheduler_DayView1_TimeBlockClick does not fire.
Why ?

Thank you
 

Alexander Stolte

Expert
Licensed User
Longtime User
When I click on blackout the event ASScheduler_DayView1_TimeBlockClick does not fire.
Why ?
Because thats the sense of a blackout day?
The day is then blocked.
I should remove a blackout.
First question:
It asks me for ID. How can I get the ID?
there is no function for this yet, I would have to add it first. But the next update will take some time.
 

MarcoRome

Expert
Licensed User
Longtime User
Because thats the sense of a blackout day?
The day is then blocked.

For example, in my specific case I choose which days are not available.
The user may have made a mistake and may want to go back.
This is why we needed to be able to activate/deactivate it.
 

MarcoRome

Expert
Licensed User
Longtime User
Is there a way to block all Saturdays and Sundays, so they can't enter any appointments ?
 

Alexander Stolte

Expert
Licensed User
Longtime User
For example, in my specific case I choose which days are not available.
The user may have made a mistake and may want to go back.
This is why we needed to be able to activate/deactivate it.
Then please wait for the delete function.
Is there a way to block all Saturdays and Sundays, so they can't enter any appointments ?
Simply check in the click event whether the day is a Saturday or Sunday.
or
Use the WorkingHour feature
 

Alexander Stolte

Expert
Licensed User
Longtime User
Today's update has major performance improvements that were long overdue.

Although I have tested everything as well as possible, errors may have crept in, so please test before you publish your apps with the latest update.
Thanks

AS_ViewPager V2.02+ is needed for this update

Update
  • 3.11
    • CalendarView
      • BugFixes
      • Performance Improvements
    • DayView
      • BugFixes
      • Performance Improvements
    • MonthView
      • BugFixes
      • Performance Improvements
    • AgendaView
      • BugFixes
      • Performance Improvements
    • API
      • Add DeleteBlackoutOnDate
      • Add GetBlackoutIdFromDate
Performance Improvements
The lists in the scheduler views are now only 20-60 items long and accordingly they now use much less RAM and load much faster. When the user scrolls or swipes, the list is expanded in the background, so the list only gets longer when needed.

Especially the interaction of several scheduler views on only one page benefits greatly from the improvements.

BugFixes
while i have improved the performance, i have noticed minor bugs in all views that have been fixed.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…