[B4X] [XUI] [Old] AS CalendarAdvanced ? - OneRow/FiveRow Calendar - Expand and Collapse [Payware]

wimpie3

Well-Known Member
Licensed User
Longtime User
Also... (I keep spamming you :)) I think the event "HeightChanged" needs to be updated more often while you're pulling the calendar up or down, in order to create the animation of the listview underneath the calender which is scrolling up/down in parallel (see the chinese example screenshot above).
 

Alexander Stolte

Expert
Licensed User
Longtime User
I think the event "HeightChanged" needs to be updated more often
Why?
RPReplay_Final16270412982.gif
 

Alexander Stolte

Expert
Licensed User
Longtime User
How is this done?
B4X:
Private Sub ASCalendarAdvanced1_HeightChanged(Height As Float)
    xpnl_home_content.top = Height
    xpnl_home_content.Height = ASTabMenu1.mBase.top - Height + 30dip
    xclv_timeline.AsView.Height = xpnl_home_content.Height - 40dip - 30dip
    xclv_timeline.Base_Resize(Root.Width,xclv_timeline.AsView.Height)
End Sub
"xpnl_home_content" is a panel below the calendar and contains an xCustomListView.
Since the height of the panel changes, you have to adjust the height of the xCustomListView.

For more questions and info please create a new thread, it doesn't help anyone if such information is on one page of many in one thread.
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 2.07
    • BugFix B4A and B4J HeightChanged event is now firing
New Example - Expand with xCLV
Expand with xCLV 001.gif
 

Alexander Stolte

Expert
Licensed User
Longtime User
I'm afraid I don't know what's wrong. If I download the sample project, check all libraries and compile, everything is fine. Maybe something is wrong with the Hosted Mac Builder?
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 2.08
    • Intern Function iif2 removed and the core iif is now used
      • B4A V11+ - B4J V9.10+ - B4I V7.50+
    • B4I better perfomance on Page Change with ASViewPager V1.19+
    • B4I better perfomance on Expand and Collapse with finger and with the functions
    • BugFixes important!
 
Last edited:

Alexander Stolte

Expert
Licensed User
Longtime User
In the next few weeks the following things will be done:
  • Performance improvements
    • a slimmed down variant of lazy loading, since many pages lead to considerable performance losses
  • BugFixing if any are available ;)
  • ✅ You can set a range of months (start and end)
  • All important functions are moved to a separate module
  • The normal ASCalendar View is published, which works without ViewPager
    • Here's what it makes possible:
    • 1627593561064.png
    • You can place the normal ASCalendar view in a list as many times as you want
    • All features and functions from the advanced version are available in the normal version thanks to its own module and I only need to extend a codebase
 
Last edited:

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 2.10
    • New Event VisibleRangeChange - is triggered before the new page is completely visible.
    • Add SetLimitRange - Limit the calendar to a certain range of months
      • Set one of them to 0 if you dont want a limit
SetLimitRange
Currently this function only works if it is called before "CreateCalendar"
Example:
You can now swipe the calendar 1 month back and 1 month forward, all other months are not loaded.
B4X:
Dim p_1 As Period : p_1.Months = -1
Dim p_2 As Period : p_2.Months = 1
ASCalendarAdvanced1.SetLimitRange(DateUtils.AddPeriod(DateTime.Now,p_1),DateUtils.AddPeriod(DateTime.Now,p_2))
ASCalendarAdvanced1.CreateCalendar
  • Set start and end to the same month to show only 1 month.
    • B4X:
      ASCalendarAdvanced1.SetLimitRange(DateTime.Now,DateTime.Now)
  • set one of the two to "0" so that the other months can be reloaded
    • B4X:
      ASCalendarAdvanced1.SetLimitRange(0,0)
 

Alexander Stolte

Expert
Licensed User
Longtime User
Version 2.10 is available as backup in the #1st post.
Update
  • 2.11
    • Designer Property "Expanded" a better handling of the view
      • If True the full height is used to display the view expanded
      • IF False the full height is used to display the view collapsed
      • Old Handling:
        • If True the full height is used to display the view collapsed and from the body height the expanded heihgt was calculated
    • Designer Property "BodyItemHeightInPercentage" Removed
      • was a poor indicator of how big the header is
    • Add Desinger Property "HeaderHeight" - Determines the size of the header. The larger the number the less space the items have in the body
    • Add Designer Property "KeepSelectedDate"
    • Add Designer Porperty "BottomHeight" - the height of the drag-panel on the bottom, to expand or collapse the view
    • Add Designer Property "ShowOtherMonths" - Only in MonthView - set it to False if you dont show the days from the next or previous month
    • Add Expand - Expands the view
    • Add Close - Collsaps the view
    • B4J BugFixes
Updated example project are in the #1st post.

Designer Property "Expanded"
If "True" the calendar is expanded.
If "False" the calendar is collapsed.
Expanded = False
IF False then the full view height is used to show the calendar collapsed.
Based on this the expanded view height are calculated, if you expand the view.
1628594594399.png

Expanded = True
If True then the full view height is used to show the calendar expanded.
Based on this the collapsed view height are calculated, if you collapse the view.
1628594667747.png

Designer Property "HeaderHeight"
Now you can define how big the header should be and is no longer defined in percent.
50 = 50dip
Designer Property "BottomHeight"
Now you can define in the designer how big the drag panel is, to expand or collapse the view.
Designer Property "KeepSelectedDate"
WeekView: The same week day is selected if you switch to the next week e.g. Monday 05.07.201-> Monday 12.07.2021 - MonthView: The same date is selected if you switch to the next month e.g 22.07.2021-> 22.08.2021
Designer Property "ShowOtherMonths"
Only in MonthView - set it to False if you dont show the days from the next or previous month
Expand and Close
You can now expand or collapse the view per code.
 
Top