B4A Library [B4X] [XUI] AS CalendarExpandable📅 [Payware]

This view was developed from scratch based on the AS_DatePicker and the AS_CalendarViewWeek from the AS_Scheduler. Both combined results in a fantastic new view.

Those who have already purchased AS_CalendarAdvanced can use the same key to use this library.

This library is not free, because, it cost a lot of time and gray hair to create such views.
Donations from 10€ are valid. (You can donate any amount you want :))
Please write CalendarExpandable in the order description, thanks.

or buy it now directly
Thanks for your understanding. :)
  1. Donate
  2. I will send you an e-mail with the code to decrypt the .zip file
  3. Done
The calendar can be collapsed and expanded
gwZXTQq3IurqGBp3BuhDSQu58jQzoqCwVsgDwnN5DbrThEb9rS.jpeg

dOax94GshRmojjq3OSGwbxqjwrnwThCEiZWkVSy10opJoJX0V2.jpeg

3 Types of Appointments
AppointmentType_1
ooS9S9ubc56wklxLs1mnHFdVQMTxoh00QbCUUFa9KozKPV7bAO.jpeg

AppointmentType_2
QXZDa7DWTkHiKzYkKDGnJOLK7extFLIcP07WiZ6kyp9C0nMmHA.jpeg

AppointmentType_3
JhrHfsSQ5ht1EvFmPzrwIAGRsfEcJYlI6GmWpgjvLAlVtqj4ZU.jpeg


Make sure you are using ASViewPager V2.02+
B4j: jXUI,jDateUtils,ASViewPager
B4a: XUi,DateUtils,ASViewPager
B4i: iXUI,iDateUtils,ASViewPager
AS_CalendarExpandable
Author: Alexander Stolte
Version: 1.00

  • ASCalendarExpandable_AppointmentType1
    • Fields:
      • Color As Int
      • Date As Long
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarExpandable_AppointmentType1_ItemProperties
    • Fields:
      • Height As Float
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • Padding As Float
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarExpandable_AppointmentType2
    • Fields:
      • Color As Int
      • Date As Long
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • Text As String
      • TextColor As Int
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarExpandable_AppointmentType2_ItemProperties
    • Fields:
      • CornerRadius As Float
      • Height As Float
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • Padding As Float
      • TextAlignment_Horizontal As String
      • xfont As B4XFont
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarExpandable_AppointmentType3
    • Fields:
      • Color As Int
      • EndDate As Long
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • StartDate As Long
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarExpandable_AppointmentType3_ItemProperties
    • Fields:
      • AlphaColor As Int
      • CornerRadius As Float
      • Height As Float
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarExpandable_BodyProperties
    • Fields:
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • TextColor As Int
      • xFont As B4XFont
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarExpandable_CustomDrawDay
    • Fields:
      • BackgroundPanel As B4XView
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • xlbl_Date As B4XView
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarExpandable_HeaderProperties
    • Fields:
      • ButtonIconSize As Float
      • Height As Float
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • TextColor As Int
      • xFont As B4XFont
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarExpandable_MonthNameShort
    • Fields:
      • April As String
      • August As String
      • December As String
      • February As String
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • January As String
      • July As String
      • June As String
      • March As String
      • May As String
      • November As String
      • October As String
      • September As String
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarExpandable_WeekNameShort
    • Fields:
      • Friday As String
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • Monday As String
      • Saturday As String
      • Sunday As String
      • Thursday As String
      • Tuesday As String
      • Wednesday As String
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarExpandable_WeekNumberProperties
    • Fields:
      • Color As Int
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • Text As String
      • TextColor As Int
      • Width As Float
      • xFont As B4XFont
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • AS_CalendarExpandable
    • Events:
      • CustomDrawDay_MonthView (Date As Long, Views As ASCalendarExpandable_CustomDrawDay)
      • CustomDrawDay_WeekView (Date As Long, Views As ASCalendarExpandable_CustomDrawDay)
      • SelectedDateChanged (Date As Long)
      • SelectedDateRangeChanged (StartDate As Long, EndDate As Long)
    • Fields:
      • mBase As B4XView
      • Tag As Object
    • Functions:
      • Add_AppointmentType1 (Date As Long, Color As Int) As String
        Call Refresh if you add something
      • Add_AppointmentType2 (Date As Long, Color As Int, Text As String, TextColor As Int) As String
        Call Refresh if you add something
      • Add_AppointmentType3 (StartDate As Long, EndDate As Long, Color As Int) As String
        Call Refresh if you add something
      • AppointmentsReset As String
      • ChangeView (NewView As String) As String
        <code>AS_CalendarExpandable1.ChangeView(AS_CalendarExpandable1.CurrentView_YearView)</code>
      • Class_Globals As String
      • Close As String
      • CreateAppointmentType1 (Date As Long, xpnl_Date As B4XView) As String
      • CreateAppointmentType2 (Date As Long, xpnl_Date As B4XView) As String
      • CreateAppointmentType3 (Appointment As ASCalendarExpandable_AppointmentType3, xpnl_Appointments_Type3 As B4XView) As String
      • CreateASCalendarExpandable_AppointmentType1 (Date As Long, Color As Int) As ASCalendarExpandable_AppointmentType1
      • CreateASCalendarExpandable_AppointmentType1_ItemProperties (Height As Float, Padding As Float) As ASCalendarExpandable_AppointmentType1_ItemProperties
      • CreateASCalendarExpandable_AppointmentType2 (Date As Long, Color As Int, Text As String, TextColor As Int) As ASCalendarExpandable_AppointmentType2
      • CreateASCalendarExpandable_AppointmentType2_ItemProperties (xfont As B4XFont, Height As Float, Padding As Float, CornerRadius As Float, TextAlignment_Horizontal As String) As ASCalendarExpandable_AppointmentType2_ItemProperties
      • CreateASCalendarExpandable_AppointmentType3 (StartDate As Long, EndDate As Long, Color As Int) As ASCalendarExpandable_AppointmentType3
      • CreateASCalendarExpandable_AppointmentType3_ItemProperties (Height As Float, AlphaColor As Int, CornerRadius As Float) As ASCalendarExpandable_AppointmentType3_ItemProperties
      • CreateASCalendarExpandable_BodyProperties (xFont As B4XFont, TextColor As Int) As ASCalendarExpandable_BodyProperties
      • CreateASCalendarExpandable_CustomDrawDay (BackgroundPanel As B4XView, xlbl_Date As B4XView) As ASCalendarExpandable_CustomDrawDay
      • CreateASCalendarExpandable_HeaderProperties (Height As Float, xFont As B4XFont, TextColor As Int, ButtonIconSize As Float) As ASCalendarExpandable_HeaderProperties
      • CreateASCalendarExpandable_MonthNameShort (January As String, February As String, March As String, April As String, May As String, June As String, July As String, August As String, September As String, October As String, November As String, December As String) As ASCalendarExpandable_MonthNameShort
      • CreateASCalendarExpandable_WeekNameShort (Monday As String, Tuesday As String, Wednesday As String, Thursday As String, Friday As String, Saturday As String, Sunday As String) As ASCalendarExpandable_WeekNameShort
      • CreateASCalendarExpandable_WeekNumberProperties (Width As Float, Color As Int, xFont As B4XFont, TextColor As Int, Text As String) As ASCalendarExpandable_WeekNumberProperties
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String
        Base type must be Object
      • Expand As String
      • getAppointmentType1 As List
      • getAppointmentType1_ItemProperties As ASCalendarExpandable_AppointmentType1_ItemProperties
      • getAppointmentType2 As List
      • getAppointmentType2_ItemProperties As ASCalendarExpandable_AppointmentType2_ItemProperties
      • getAppointmentType3 As List
      • getAppointmentType3_ItemProperties As ASCalendarExpandable_AppointmentType3_ItemProperties
      • getBodyColor As Int
      • getBodyProperties As ASCalendarExpandable_BodyProperties
      • getCurrentDateColor As Int
      • getCurrentView As String
      • getCurrentView_CenturyView As String
      • getCurrentView_DecadeView As String
      • getCurrentView_MonthView As String
      • getCurrentView_YearView As String
      • getDragPanelColor As Int
      • getDragPanelIndicatorColor As Int
      • getFirstDayOfWeek As Int
      • GetFirstDayOfWeek2 (Ticks As Long, FirstDayOfWeek As Int) As Long
        FirstDayOfWeek:
        Friday = 1
        Thursday = 2
        Wednesday = 3
        Tuesday = 4
        Monday = 5
        Sunday = 6
        Saturday = 7
      • getGridLineColor As Int
      • getHeaderColor As Int
      • getHeaderProperties As ASCalendarExpandable_HeaderProperties
      • getInactiveDaysVisible As Boolean
      • getMaxDate As Long
      • getMinDate As Long
      • GetMonthNameByIndex (index As Int) As String
      • getMonthNameShort As ASCalendarExpandable_MonthNameShort
        Call Refresh if you change something
        <code>AS_DatePicker1.MonthNameShort = AS_DatePicker1.CreateASCalendarExpandable_MonthNameShort("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec")</code>
      • getMouseHoverFeedback As Boolean
      • getSelectedDate As Long
      • getSelectedDateColor As Int
      • getSelectedEndDate As Long
        Only in SelectMode "Range"
      • getSelectedStartDate As Long
      • getSelectMode As String
      • getSelectMode_Day As String
      • getSelectMode_Month As String
      • getSelectMode_Range As String
      • getShowGridLines As Boolean
      • getShowWeekNumbers As Boolean
        Gets or sets the number of visible weeks
        Call Refresh to commit changes
      • getStartDate As Long
      • GetWeekNameByIndex (Index As Int) As String
        1 = Sunday
      • getWeekNameHeight As Float
      • getWeekNameShort As ASCalendarExpandable_WeekNameShort
      • getWeekNumberProperties As ASCalendarExpandable_WeekNumberProperties
        Call Refresh if you change something
        Default Values
        Width: <code>20dip</code>
        Color: <code>xui.Color_ARGB(255,32, 33, 37)</code>
        xFont: <code>xui.CreateDefaultFont(15)</code>
        TextColor: <code>xui.Color_White</code>
      • GetWeekNumberStartingFromMonday (ticks As Long) As Int
      • Initialize (Callback As Object, EventName As String) As String
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • MonthBetween (Date1 As Long, Date2 As Long) As Int
        Compute month between 2 dates
        Version: 1, ( ) WIP (X) Release
        Prior set DateTime.DateFormat
        Date1/2: Date formatted DateTime.DateFormat
        Return: mont - 0 if same month
      • NumberOfWeeksBetween (StartDate As Long, EndDate As Long) As Int
      • Rebuild As String
      • Refresh As String
      • RefreshHeader As String
      • Remove_Appointment (TypeNumber As Int, Date As Long, RemoveAll As Boolean) As String
        Call Refresh if you remove something
        TypeNumber: 1,2 or 3
        RemoveAll: If true, then remove all appointments on this date
      • setAppointmentType1_ItemProperties (ItemProperties As ASCalendarExpandable_AppointmentType1_ItemProperties) As String
      • setAppointmentType2_ItemProperties (ItemProperties As ASCalendarExpandable_AppointmentType2_ItemProperties) As String
      • setAppointmentType3_ItemProperties (ItemProperties As ASCalendarExpandable_AppointmentType3_ItemProperties) As String
      • setBodyColor (Color As Int) As String
      • setBodyProperties (BodyProperties As ASCalendarExpandable_BodyProperties) As String
      • setCurrentDateColor (Color As Int) As String
      • setCurrentView (CurrentView As String) As String
      • setDragPanelColor (Color As Int) As String
      • setDragPanelIndicatorColor (Color As Int) As String
      • setFirstDayOfWeek (number As Int) As String
        1-7
        Friday = 1
        Thursday = 2
        Wednesday = 3
        Tuesday = 4
        Monday = 5
        Sunday = 6
        Saturday = 7
      • setGridLineColor (Color As Int) As String
      • setHeaderColor (Color As Int) As String
      • setHeaderProperties (HeaderProperties As ASCalendarExpandable_HeaderProperties) As String
      • setInactiveDaysVisible (Visible As Boolean) As String
      • setMaxDate (MaxDate As Long) As String
        Will restrict date navigations features of forward, and also cannot swipe the control using touch gesture beyond the max date range
      • setMinDate (MinDate As Long) As String
        Will restrict date navigations features of backward, also cannot swipe the control using touch gesture beyond the min date range
      • setMonthNameShort (MonthNameShort As ASCalendarExpandable_MonthNameShort) As String
      • setMouseHoverFeedback (Feedback As Boolean) As String
      • setSelectedDate (Date As Long) As String
      • setSelectedDateColor (Color As Int) As String
      • setSelectedEndDate (Date As Long) As String
      • setSelectedStartDate (Date As Long) As String
      • setSelectMode (Mode As String) As String
      • setShowGridLines (Show As Boolean) As String
      • setShowWeekNumbers (Show As Boolean) As String
      • setStartDate (Date As Long) As String
      • setWeekNameHeight (Height As Float) As String
      • setWeekNameShort (WeekNameShort As ASCalendarExpandable_WeekNameShort) As String
        Call Refresh if you change something
        <code>AS_DatePicker1.CreateASCalendarExpandable_WeekNameShort("Mon","Tue","Wed","Thu","Fri","Sat","Sun")</code>
      • setWeekNumberProperties (WeekNumberProperties As ASCalendarExpandable_WeekNumberProperties) As String
    • Properties:
      • AppointmentType1 As List [read only]
      • AppointmentType1_ItemProperties As ASCalendarExpandable_AppointmentType1_ItemProperties
      • AppointmentType2 As List [read only]
      • AppointmentType2_ItemProperties As ASCalendarExpandable_AppointmentType2_ItemProperties
      • AppointmentType3 As List [read only]
      • AppointmentType3_ItemProperties As ASCalendarExpandable_AppointmentType3_ItemProperties
      • BodyColor As Int
      • BodyProperties As ASCalendarExpandable_BodyProperties
      • CurrentDateColor As Int
      • CurrentView As String
      • CurrentView_CenturyView As String [read only]
      • CurrentView_DecadeView As String [read only]
      • CurrentView_MonthView As String [read only]
      • CurrentView_YearView As String [read only]
      • DragPanelColor As Int
      • DragPanelIndicatorColor As Int
      • FirstDayOfWeek As Int
        1-7
        Friday = 1
        Thursday = 2
        Wednesday = 3
        Tuesday = 4
        Monday = 5
        Sunday = 6
        Saturday = 7
      • GridLineColor As Int
      • HeaderColor As Int
      • HeaderProperties As ASCalendarExpandable_HeaderProperties
      • InactiveDaysVisible As Boolean
      • MaxDate As Long
        Will restrict date navigations features of forward, and also cannot swipe the control using touch gesture beyond the max date range
      • MinDate As Long
        Will restrict date navigations features of backward, also cannot swipe the control using touch gesture beyond the min date range
      • MonthNameShort As ASCalendarExpandable_MonthNameShort
        Call Refresh if you change something
        <code>AS_DatePicker1.MonthNameShort = AS_DatePicker1.CreateASCalendarExpandable_MonthNameShort("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec")</code>
      • MouseHoverFeedback As Boolean
      • SelectedDate As Long
      • SelectedDateColor As Int
      • SelectedEndDate As Long
        Only in SelectMode "Range"
      • SelectedStartDate As Long
      • SelectMode As String
      • SelectMode_Day As String [read only]
      • SelectMode_Month As String [read only]
      • SelectMode_Range As String [read only]
      • ShowGridLines As Boolean
      • ShowWeekNumbers As Boolean
        Gets or sets the number of visible weeks
        Call Refresh to commit changes
      • StartDate As Long
      • WeekNameHeight As Float
      • WeekNameShort As ASCalendarExpandable_WeekNameShort
        Call Refresh if you change something
        <code>AS_DatePicker1.CreateASCalendarExpandable_WeekNameShort("Mon","Tue","Wed","Thu","Fri","Sat","Sun")</code>
      • WeekNumberProperties As ASCalendarExpandable_WeekNumberProperties
        Call Refresh if you change something
        Default Values
        Width: <code>20dip</code>
        Color: <code>xui.Color_ARGB(255,32, 33, 37)</code>
        xFont: <code>xui.CreateDefaultFont(15)</code>
        TextColor: <code>xui.Color_White</code>
Changelog
  • 1.00
    • Release
  • 1.01
    • Add get and set WeekNameProperties
  • 1.02
    • Add Scroll2Date
  • 1.03
    • B4I BugFix
  • 1.04
    • BugFix
  • 1.05
    • BugFixes
  • 1.06
    • BugFixes
  • 1.07
    • In WeekView, the year gap is now only 2 years, instead of 5
  • 1.08
    • Add Event HeightChanged
  • 1.09
    • BugFixes
    • Performance Improvements
  • 1.10
    • BugFixes
  • 1.11
    • Add Event PageChanged
    • Add get CurrentMonthWeek
    • BugFixes
  • 1.12
    • Add get MonthView
    • Add get WeekView
    • Add Event CustomDrawHeader
    • BugFixes
Have Fun :)
 

Attachments

  • AS CalendarExpandable Example.zip
    70.8 KB · Views: 172
  • AS_CalendarExpandable.zip
    22.1 KB · Views: 42
Last edited:

yiankos1

Well-Known Member
Licensed User
Longtime User
Hello Alexander,

I would like to inform you that Remove_Appointment does not remove dot from the bottom of date even i Refresh it.

One more strange behavior is, when refreshing couple of times calendar, the current date color becomes bolder until sometime its no more semi-transparent. It's like redrawing it self again and again.

I am using a non-Expandable calendar and it is tested on Google Pixel 7 Pro latest software.
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.06
    • BugFixes
I would like to inform you that Remove_Appointment does not remove dot from the bottom of date even i Refresh it.

One more strange behavior is, when refreshing couple of times calendar, the current date color becomes bolder until sometime its no more semi-transparent. It's like redrawing it self again and again.
Should be fixed now. This happend in collapsed state only, right?
 

yiankos1

Well-Known Member
Licensed User
Longtime User
Update
  • 1.06
    • BugFixes

Should be fixed now. This happend in collapsed state only, right?
Hello Alexander,

I am using your tabStrip,tabMenuAdvanced,viewPager in order to have four layouts at my main page. First layout consists of a CalendarExpandable and a CLV. Everything works fine. Second layout consists again of a CalendarExpandable and a CLV. When closing application it gives me this error. The problem comes from the calendar at the second layout. If i remove the second calendar from this layout, everything works fine. Do you have anything on your mind? Why does the two calendars conflicts?

Thank you in advance.
 

Attachments

  • 1.jpg
    1.jpg
    118.1 KB · Views: 75

yiankos1

Well-Known Member
Licensed User
Longtime User

Attachments

  • B4A.zip
    10.1 KB · Views: 56

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.07
    • In WeekView, the year gap is now only 2 years, instead of 5
I have now set the gap on the WeekView to 2 years instead of 5 years. So the view now only loads 2 years in advance and in the past.
Tabstrip is changed in order to accept tabmenu advanced, if this helps.
The problem is not that. The problem is that he can't cope with the 2 big lists.
I'm using Lazy loading.
 

yiankos1

Well-Known Member
Licensed User
Longtime User
Update
  • 1.07
    • In WeekView, the year gap is now only 2 years, instead of 5
I have now set the gap on the WeekView to 2 years instead of 5 years. So the view now only loads 2 years in advance and in the past.

The problem is not that. The problem is that he can't cope with the 2 big lists.
I'm using Lazy loading.
Good mornig Alexander,

I tested the updated library with the provided project, and I encountered the same issue in release mode once again. Should i change something on my side?

I switched to AS DatePickerTimeline and everything is working fine.

Thank you for your overall contribution.
 
Last edited:

Alexander Stolte

Expert
Licensed User
Longtime User
and I encountered the same issue in release mode once again. Should i change something on my side?
The problem is that it is a heavy view. We have 2 big lists per calendar, which use lazy loading, but are still big. You have 1x the list in the WeekView and 1x the list in the MonthView, so that this can continue seamlessly. And if you now add the view 2x to the form, then the system has to work with 4 big lists. I would recommend to add only 1 calendar and hide it only when you are on a page that doesn't need it anymore.

In my test the error didn't come after the customization when I closed the app.

switched to AS DatePickerTimeline and everything is working fine.
This view is made to be used only on one level and in addition, thanks to the CustomDraw event, you can customize the design to look the same as in the calendar. Or you use the WeekView from the AS_Scheduler, there the WeekView is standalone.

Thank you for your overall contribution.
and thank you for the supplements (donation) 💪
 

asales

Expert
Licensed User
Longtime User
If I put a Log inside this events (MonthView and WeekView), I get several dates.
In the WeekView event the dates are from 2018.
B4X:
Private Sub AS_CalendarExpandable1_CustomDrawDay_MonthView (Date As Long, Views As ASCalendarExpandable_CustomDrawDay)
    Log("CustomDrawDay_MonthView: " & DateTime.Date(Date))
'CustomDrawDay_MonthView: 28/08/2023
'...
'CustomDrawDay_MonthView: 09/03/2024
End Sub

Private Sub AS_CalendarExpandable1_CustomDrawDay_WeekView (Date As Long, Views As ASCalendarExpandable_CustomDrawDay)
    LogColor("CustomDrawDay_WeekView: " & DateTime.Date(Date), Colors.Yellow)
'CustomDrawDay_WeekView: 04/01/2018
'...
'CustomDrawDay_WeekView: 29/01/2018
End Sub
I thought this events was raised then if the calendar is expanded or collapsed, but don't.

This events are for? When I need to use this events?

I want to change the size of a customlistview below the calendar, when it is collapse or expand. There is a event to check the resize?

Thanks!
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.08
    • Add Event HeightChanged

Ignore the dates in the logs. This is only an error if you are visible shown an incorrect date or the SelectedDate event gives you an incorrect date..

This events are for? When I need to use this events?
The CustomDraw event is there to completely customize the look of a day. For example, you can use the event to add new labels, remove the size of existing views and so on.
I want to change the size of a customlistview below the calendar, when it is collapse or expand. There is a event to check the resize?
with the new HeightChanged event
 

asales

Expert
Licensed User
Longtime User
Thanks! Worked fine.

New question:
I saw that are a delay of approximately 5 seconds to show the days in calendar.
It is the default? Can I decrease this?
Thanks again.
 

asales

Expert
Licensed User
Longtime User
Yes. I always use the Release Obfuscated mode.

In B4J it takes a short time, but in B4A it takes more.

Here a clean example (based in yours) and the video.
Here tooks almost 3 seconds (when I started recording the app was already open). In B4J this time is less.
In other project, that I want to put in production, the days take more to show.
This delay is default of the component?
 

Attachments

  • ascalendarexpandable2.zip
    76.2 KB · Views: 37

Alexander Stolte

Expert
Licensed User
Longtime User
This delay is default of the component?
No!!

I have tested your project and it takes 1 second until everything is visible.
It will be due to the device, as 2 large lists are filled during start. The only thing I can do now is to make the order of which view should be built first dynamic.
the only artificial delay that exists is 250 milliseconds, but it is necessary because otherwise the xclv will not scroll to the index I want.
 

Alexander Stolte

Expert
Licensed User
Longtime User
if the native scrollview of b4a would work better when adding new panels before the visual area, then it wouldn't be a problem to add the days that were only added in the past when scrolling. But unfortunately this is not possible without jerks and other unwanted behavior. That's why I have to add 2 years or 4 to the list in the unfolded state. Per view this is about 1k elements that are added to the list.
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.12
    • Add get MonthView
    • Add get WeekView
    • Add Event CustomDrawHeader
    • BugFixes
CustomDrawHeader
B4X:
Private Sub AS_CalendarExpandable1_CustomDrawHeader(Date As Long,Views As ASCalendarExpandable_CustomDrawHeader)
    If AS_CalendarExpandable1.CurrentView = AS_CalendarExpandable1.CurrentView_MonthView Then
        Views.xlbl_Text.Text = "Test " & DateUtils.GetMonthName(Date)
    End If
End Sub
 
Last edited:
Top