B4A Library [B4X] [XUI] AS CalendarExpandableđź“… [Payware]

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
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
    118.1 KB · Views: 85

yiankos1

Well-Known Member
Licensed User
Longtime User

Attachments

  • B4A.zip
    10.1 KB · Views: 67

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
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: 47

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:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…