B4A Library [B4X] [XUI] AS CalendarAdvanced đź“… - OneRow/FiveRow Calendar - Expand and Collapse

Alexander Stolte

Expert
Licensed User
Hey all, after almost a week of work and much frustration, I am proud to share with you a calendar view.
The view is inspired on the calendar view in the outlook app.

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

Thanks for your understanding. :)
  1. Donate
  2. I will send you an e-mail with the code to decrypt the .zip file
  3. Done
NEW Special Days
IMG_5041.jpg

NEW AppointmentType1
IMG_5012.jpg

AppointmentType1,AppointmentType2,AppointmentType3
1618912554091.png
1618912567441.png
1618912577470.png

Collapsed
IMG_3868.jpg

Expanded
IMG_3787.jpg

seamless transition between the two modes
ezgif.com-gif-maker.gif

You can disable the Expandable to use the view in only one mode, then the bottom drag bar is not visible.

B4J is currently not supported, but will be in the near future.
B4J is now supported.
B4j: jXUI,jDateUtils,jReflection,xCustomListView,ASViewPager
B4a: XUi,DateUtils,Reflection,xCustomListView,ASViewPager
B4i: iXUI,iDateUtils,xCustomListView,ASViewPager,GestureRecognizer
Make sure you are using ASViewPager V1.10+
On B4I you need GestureRecognizer Download the .bas file in the attachment
Examples:
change body month names and header week names:
ASCalendarAdvanced1.WeekNameShort = ASCalendarAdvanced1.CreateASCalendarAdvanced_WeekNameShort("Mon","Tue","Wed","Thu","Fri","Sat","Sun")
ASCalendarAdvanced1.MonthNameShort = ASCalendarAdvanced1.CreateASCalendarAdvanced_MonthNameShort("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec")
ASCalendarAdvanced1.UpdateBody 'Update all body items to the new style/text
ASCalendarAdvanced1.UpdateHeader 'Update all header items to the new style/text
Call this in B4XPage_Created or on Form Load and call this after you change something on the body, but only once at runtime
B4X:
'Call this to Build the calendar, unfortunately this is needed, otherwise runtime errors will occur
'Call this after you set all properties you want
ASCalendarAdvanced1.CreateCalendar
Mark all Sundays as a SpecialDay:
Sub ASCalendarAdvanced1_VisibleRangeChanged(StartDate As Long,EndDate As Long)
    Dim sundays As List = ASCalendarAdvanced1.GetDaysBetween2Dates(StartDate,EndDate, 1)
    For Each s As Long In sundays
        ASCalendarAdvanced1.AddSpecialDay(s,xui.Color_ARGB(255,221, 95, 96),"official_holiday")
    Next
    ASCalendarAdvanced1.CommitSpecialDays
End Sub
ASCalendarAdvanced
Author: Alexander Stolte
Version: 2.00

  • ASCalendarAdvanced
    • Events:
      • HeightChanged (Height As Float)
      • SelectedDateChanged (Date As Long)
      • TouchDown
      • TouchUp
      • VisibleRangeChanged (StartDate As Long, EndDate As Long)
    • Fields:
      • mBase As B4XView
      • Tag As Object
    • Functions:
      • AddAppointmentType1 (date As Long, color As Int) As String
      • AddAppointmentType2 (date As Long, color As Int, text As String, text_color As Int) As String
      • AddAppointmentType3 (start_date As Long, end_date As Long, color As Int) As String
      • AddSpecialDay (date As Long, color As Int, identifier As String) As String
        Adds a new special day - call CommitSpecialDays if youre done with adding
        color - Text Color
        value - e.g. "official_holiday", "birthday","Vacation"
      • Back2CurrentDate As String
        Slides Back or Forward to the Current Date
      • Class_Globals As String
      • CommitSpecialDays As String
        Commits all new visible special dates
      • CommitStyleChanges As String
        a simple Base_Resize, but all visible items ar updated
      • CreateASCalendarAdvanced_AppointmentType1 (date As Long, color As Int) As ASCalendarAdvanced_AppointmentType1
        simple dot under date
      • CreateASCalendarAdvanced_AppointmentType2 (date As Long, color As Int, text As String, text_color As Int) As ASCalendarAdvanced_AppointmentType2
        short text above date
      • CreateASCalendarAdvanced_AppointmentType2_ItemProperties (xfont As B4XFont, height As Float, padding As Float, corner_radius As Float) As ASCalendarAdvanced_AppointmentType2_ItemProperties
      • CreateASCalendarAdvanced_AppointmentType3 (start_date As Long, end_date As Long, color As Int) As ASCalendarAdvanced_AppointmentType3
      • CreateASCalendarAdvanced_AppointmentType3_ItemProperties (height As Float, alpha_color As Int, corner_radius As Float) As ASCalendarAdvanced_AppointmentType3_ItemProperties
        alpha_color - value between 0 - 255, its the aplha for the range appointments
      • CreateASCalendarAdvanced_BodyTextProperties (TextColor As Int, TextFont As B4XFont, TextAlignment_Vertical As String, TextAlignment_Horizontal As String) As ASCalendarAdvanced_BodyTextProperties
      • CreateASCalendarAdvanced_ExtraInfosTextProperties (TextColor As Int, TextFont As B4XFont, TextAlignment_Vertical As String, TextAlignment_Horizontal As String) As ASCalendarAdvanced_ExtraInfosTextProperties
      • CreateASCalendarAdvanced_HeaderTextProperties (TextColor As Int, TextFont As B4XFont, TextAlignment_Vertical As String, TextAlignment_Horizontal As String) As ASCalendarAdvanced_HeaderTextProperties
      • CreateASCalendarAdvanced_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 ASCalendarAdvanced_MonthNameShort
      • CreateASCalendarAdvanced_SpecialDay (date As Long, color As Int, identifier As String) As ASCalendarAdvanced_SpecialDay
      • CreateASCalendarAdvanced_WeekNameShort (Monday As String, Tuesday As String, Wednesday As String, Thursday As String, Friday As String, Saturday As String, Sunday As String) As ASCalendarAdvanced_WeekNameShort
      • CreateCalendar
        call this function only once
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String
        Base type must be Object
      • getAppointmentType2_ItemPropertiest As ASCalendarAdvanced_AppointmentType2_ItemProperties
      • getAppointmentType3_ItemPropertiest As ASCalendarAdvanced_AppointmentType3_ItemProperties
      • getBodyTextProperties As ASCalendarAdvanced_BodyTextProperties
      • getBottomHeight As Float
        gets or sets the height of the drag-panel on the bottom, to expand or collapse the view
        Default 15dip
      • GetDaysBetween2Dates (StartDate As Long, EndDate As Long, RequiredDayOfWeek As Int) As List
        RequiredDayOfWeek - week starts at 1=sunday,2=monday...
        Call it if you are done adding new special days, makes this way makes the performance better
      • GetExpandedViewHeight As Float
        gets the view height of the expanded view height
      • getExtraInfosTextProperties As ASCalendarAdvanced_ExtraInfosTextProperties
      • getHeaderTextProperties As ASCalendarAdvanced_HeaderTextProperties
      • getMonthNameShort As ASCalendarAdvanced_MonthNameShort
      • GetSpecialDayAt (date As Long) As ASCalendarAdvanced_SpecialDay
        Gets a ASCalendarAdvanced_SpecialDay object on a date if exists
      • getVisibleDateRange As Map
        gets the current visible date range as map
        <code>Dim tmp_m As Map = ASCalendarAdvanced1.VisibleDateRange
        Log("StartDate: " & DateUtils.TicksToString(tmp_m.Get("StartDate")))
        Log("EndDate: " & DateUtils.TicksToString(tmp_m.Get("EndDate")))</code>
      • getWeekNameShort As ASCalendarAdvanced_WeekNameShort
      • Initialize (Callback As Object, EventName As String) As String
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • NextWeek As String
        Scrolls to the next week or month it depends on the expanded state
      • PreviousWeek As String
        Scrolls to the previous week or month it depends on the expanded state
      • RemoveAppointmentType1 (date As Long) As String
        if there are multiple AppointmentType1 on the date, then all of them will be removed
      • RemoveAppointmentType2 (date As Long) As String
        removes AppointmentType2 on that day
        call CommitStyleChanges if youre done with removing
      • RemoveOneAppointmentType (aptype As Int, date As Long, all As Boolean) As String
      • RemoveOneAppointmentType1 (date As Long) As String
        if there are multiple AppointmentType1 on the date, then one of them will be removed
        call CommitStyleChanges if youre done with removing
      • RemoveSpecialDay (date As Long) As String
        Removes a special day - call CommitSpecialDays if youre done with adding
      • Reset (ApType1 As Boolean, ApType2 As Boolean, ApType3 As Boolean, SpecialDays As Boolean) As String
        removes all appointments or special days. Set to "True" to control what should be reset
        call CommitStyleChanges if youre resetting the SpecialDays
      • Scroll2Date (Date As Long) As String
        Slides Back or Forward to a special date
      • setAppointmentType2_ItemPropertiest (ItemProperties As ASCalendarAdvanced_AppointmentType2_ItemProperties) As String
      • setAppointmentType3_ItemPropertiest (ItemProperties As ASCalendarAdvanced_AppointmentType3_ItemProperties) As String
      • setBodyTextProperties (BodyTextProperties As ASCalendarAdvanced_BodyTextProperties) As String
      • setBottomHeight (height As Float) As String
        gets or sets the height of the drag-panel on the bottom, to expand or collapse the view
        Default 15dip
        call CommitStyleChanges if you change the value
      • setExtraInfosTextProperties (ExtraInfosTextProperties As ASCalendarAdvanced_ExtraInfosTextProperties) As String
      • setExtraItemGap (gap As Float) As String
        sets the ExtraItemGab - is to prevent the font from covering the month number
        Default 6dip
        call CommitStyleChanges if you change the value
      • setHeaderTextProperties (HeaderTextProperties As ASCalendarAdvanced_HeaderTextProperties) As String
      • setMonthNameShort (MonthNameShort As ASCalendarAdvanced_MonthNameShort) As String
      • setShowFirstWeekOfMonthInFirstRow (show As Boolean) As String
        if the calendar is expanded, then the 1st week of the month will be in the 1st row
      • setWeekNameShort (WeekNameShort As ASCalendarAdvanced_WeekNameShort) As String
      • SpecialDayExists (date As Long) As Boolean
        Returns True if a special day is already added to a date
      • UpdateAll As String
        UpdateBody and UpdateHeader in one
      • UpdateBody As String
      • UpdateHeader As String
    • Properties:
      • AppointmentType2_ItemPropertiest As ASCalendarAdvanced_AppointmentType2_ItemProperties
      • AppointmentType3_ItemPropertiest As ASCalendarAdvanced_AppointmentType3_ItemProperties
      • BodyTextProperties As ASCalendarAdvanced_BodyTextProperties
      • BottomHeight As Float
        gets or sets the height of the drag-panel on the bottom, to expand or collapse the view
        Default 15dip
      • ExtraInfosTextProperties As ASCalendarAdvanced_ExtraInfosTextProperties
      • ExtraItemGap
        sets the ExtraItemGab - is to prevent the font from covering the month number
        Default 6dip
        call CommitStyleChanges if you change the value
      • HeaderTextProperties As ASCalendarAdvanced_HeaderTextProperties
      • MonthNameShort As ASCalendarAdvanced_MonthNameShort
      • ShowFirstWeekOfMonthInFirstRow
        if the calendar is expanded, then the 1st week of the month will be in the 1st row
      • VisibleDateRange As Map [read only]
        gets the current visible date range as map
        <code>Dim tmp_m As Map = ASCalendarAdvanced1.VisibleDateRange
        Log("StartDate: " & DateUtils.TicksToString(tmp_m.Get("StartDate")))
        Log("EndDate: " & DateUtils.TicksToString(tmp_m.Get("EndDate")))</code>
      • WeekNameShort As ASCalendarAdvanced_WeekNameShort
  • ASCalendarAdvanced_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.
  • ASCalendarAdvanced_AppointmentType2
    • Fields:
      • color As Int
      • date As Long
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • text As String
      • text_color As Int
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarAdvanced_AppointmentType2_ItemProperties
    • Fields:
      • corner_radius As Float
      • height As Float
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • padding As Float
      • xfont As B4XFont
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarAdvanced_AppointmentType3
    • Fields:
      • color As Int
      • end_date As Long
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • start_date As Long
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarAdvanced_AppointmentType3_ItemProperties
    • Fields:
      • alpha_color As Int
      • corner_radius As Float
      • height As Float
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarAdvanced_BodyTextProperties
    • Fields:
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • TextAlignment_Horizontal As String
      • TextAlignment_Vertical As String
      • TextColor As Int
      • TextFont As B4XFont
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarAdvanced_ExtraInfosTextProperties
    • Fields:
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • TextAlignment_Horizontal As String
      • TextAlignment_Vertical As String
      • TextColor As Int
      • TextFont As B4XFont
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarAdvanced_HeaderTextProperties
    • Fields:
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • TextAlignment_Horizontal As String
      • TextAlignment_Vertical As String
      • TextColor As Int
      • TextFont As B4XFont
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarAdvanced_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.
  • ASCalendarAdvanced_SpecialDay
    • Fields:
      • color As Int
      • date As Long
      • identifier As String
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASCalendarAdvanced_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.
  • WeekCounter
  • Vertical Swipe
  • MultiSelect
  • HideOtherMonths
  • Scroll2NextMonthIfClickOnNextMonth
  • AppointmentType1 - automatically display a + symbol when too many have been added
  • AppointmentType2 - support of multiple in one day e.g. for symbols
If you have features or something is still missing, let me know.
Changelog
  • 1.00
    • Release
  • 1.01
    • BugFixes
    • Add set ShowFirstWeekOfMonthInFirstRow - if the calendar is expanded, then the 1st week of the month will be in the 1st row - set this to true before you call "CreateCalendar"
  • 1.02
    • Add get VisibleDateRange- gets the current visible date range as map
    • BugFixes if ShowFirstWeekOfMonthInFirstRow is True
  • 1.03
    • Many BugFixes
    • ShowFirstWeekOfMonthInFirstRow is now fully implemented
  • 1.04
    • B4J Support
      • DoubleClick on Bottom to Expand or Collapse
        • Depend on Expandable
    • Add Designer Property ShowFirstWeekOfMonthInFirstRow - if the calendar is expanded then the 1st week of the month will be in the 1st row
  • 1.05 (read more about this update)
    • Important BugFixes if the view is expanded
    • Add AppointmentType1 - dots under a date
      • Add SetAppointmentType1 - adds an appointment to a date
      • IMG_5012.jpg
  • 1.06
    • BugFix
  • 1.07 (read more about this update)
    • SetAppointmentType1 renamed to AddAppointmentType1
    • BugFix on VisibleRangeChanged
    • Add GetDaysBetween2Dates - Returns a list of dates at a special day in a week e.g. all sundays between 2 dates
    • Add AddSpecialDay - Adds a new special day
      • IMG_5041.jpg
      • Add CommitSpecialDays - Commits all new visible special dates
      • Add SpecialDayExists - Returns True if a special day is already added to a date
      • Add GetSpecialDayAt - Gets a ASCalendarAdvanced_SpecialDay object on a date if exists
      • Add RemoveSpecialDay - Removes a special day
  • 2.00 (read more about this update)
    • BugFixes
    • Expand with fingers is now smooth
    • Add AppointmentType2 - Text Label above date
      • Add AddAppointmentType2 - adds an appointment to a date
    • Add AppointmentType3 - mark a range between 2 dates
      • Add AddAppointmentType3 - adds an range appointment between 2 dates
    • Add set and get AppointmentType2_ItemPropertiest - change the properties to customize AppointmentType2 look and feel e.g. corner_radius or padding
    • Add set and get AppointmentType3_ItemPropertiest - change the properties to customize AppointmentType3 look and feel e.g. corner_radius or aplha color
    • Add get and set BottomHeight - gets or sets the height of the drag-panel on the bottom, to expand or collapse the view
    • Add CommitStyleChanges - a simple Base_Resize, but all visible items ar updated
    • Add Event TouchDown - fires if the user touch the expand panel
    • Add Event TouchUp - fires if the user release the expand panel
    • Add Function GetExpandedViewHeight - gets the view height of the expanded view height
    • Add RemoveOneAppointmentType1 - if there are multiple AppointmentType1 on the date, then one of them will be removed
    • Add RemoveAppointmentType1 - if there are multiple AppointmentType1 on the date, then all of them will be removed
    • Add RemoveAppointmentType2 - removes AppointmentType2 on that day
    • Add Reset - removes all appointments or special days. Set to "True" to control what should be reset
    • Add set ExtraItemGap - is to prevent the font from covering the month number
  • 2.01 (read more about this update)
    • BugFix - Back2CurrentDay the current day panel has covered the day label
    • BugFix - AppointmentType3
    • Add get HeaderPanel - gets the header panel (code example)
    • Add set and get SelectedDate - gets or sets the selected date
    • BugFix - Removing Appointments
  • 2.02
    • BugFix
Have Fun :)
 

Attachments

Last edited:

Alexander Stolte

Expert
Licensed User
Great job.
Donation made¡¡
thank you very much! Email was sent.
What are you planning?
The biggest priority for now is the B4J support.
  • âś… B4J Support
  • âś… Even more fluid handling in B4A
  • âś…Performance optimizations
  • deliver all missing properties so that you can customize the look and handling even more at runtime
  • âś…Mark a range between 2 dates (like in the spoiler in the first post)
  • âś… set dots to show the user that something is happening on the date (like in the spoiler in the first post)
  • âś… Mark holidays or special days
  • Set outer corner radius
  • and everything that is still missing, I am open for more
 
Last edited:

Alexander Stolte

Expert
Licensed User
One of the biggest problems was the different handling of the ScrollViews in B4A and B4I. I noticed that the B4I ScrollView works better and smoother when you add pages that are ahead in the index (AddPageAt).
 

omarruben

Active Member
Licensed User
I am looking to create an appointment app, I was creating the calendar from scratch then I found this post.
I have a question, with this library ... can I click on a date and open a field editor ?(kind of dialog with some fields)
if it is possible , can you provide a small sample
thank you so much, by the way the library looks very nice
 

Alexander Stolte

Expert
Licensed User
I am looking to create an appointment app
me too
can I click on a date and open a field editor ?
you can click on a date, then the "SelectedDateChanged" Event is triggered, then you can open whatever you want.
You can use the B4XDialog to show a MessageBox with your fields.
Or you use ASDraggableBottomCard.
If you want to choose a time you can use ASWheelPicker.
by the way the library looks very nice
thanks :)
 

omarruben

Active Member
Licensed User
I am testing the library and looks good, how do I set it up to show the first week on the first line at the top? (like in classic month calendar)

2021-03-21 16_03_15-Window.jpg

2021-03-21 16_03_08-Window.jpg
 

Alexander Stolte

Expert
Licensed User
Update
1.01

  • BugFixes
  • Add set ShowFirstWeekOfMonthInFirstRow - if the calendar is expanded, then the 1st week of the month will be in the 1st row - set this to true before you call "CreateCalendar"
how do I set it up to show the first week on the first line at the top?
i just don't know how you use the view, so i added this for now, if you need this in another use case, let me know:
1616363663957.png
Check this Designer Property
ShowFirstWeekOfMonthInFirstRow:
ASCalendarAdvanced1.ShowFirstWeekOfMonthInFirstRow = True 'set this to true before you call "CreateCalendar"
ASCalendarAdvanced1.CreateCalendar
Result:
IMG_4024.jpg
 

omarruben

Active Member
Licensed User
Update
1.01

  • BugFixes
  • Add set ShowFirstWeekOfMonthInFirstRow - if the calendar is expanded, then the 1st week of the month will be in the 1st row - set this to true before you call "CreateCalendar"

i just don't know how you use the view, so i added this for now, if you need this in another use case, let me know:
View attachment 110186Check this Designer Property
ShowFirstWeekOfMonthInFirstRow:
ASCalendarAdvanced1.ShowFirstWeekOfMonthInFirstRow = True 'set this to true before you call "CreateCalendar"
ASCalendarAdvanced1.CreateCalendar
Result:
View attachment 110185
excellent!!! thank you so much
 

omarruben

Active Member
Licensed User
after changing the date :
B4X:
ASCalendarAdvanced1.Scroll2Date(DateTime.DateParse("09/25/2021"))
it does not show the right month and the option ASCalendarAdvanced1.ShowFirstWeekOfMonthInFirstRow stops working

also, how to get the current month/year showing on the screen? (programmatically)
 
Last edited:

Alexander Stolte

Expert
Licensed User
Update
1.02

  • Add get VisibleDateRange- gets the current visible date range as map
  • BugFixes if ShowFirstWeekOfMonthInFirstRow is True
after changing the date :
B4X:
ASCalendarAdvanced1.Scroll2Date(DateTime.DateParse("09/25/2021"))
it does not show the right month and the option ASCalendarAdvanced1.ShowFirstWeekOfMonthInFirstRow stops working
this should work now, i will extend it during the day, so that it is also applied when you expand the calendar.
how to get the current month/year showing on the screen? (programmatically)
get VisibleDateRange:
Dim tmp_m As Map = ASCalendarAdvanced1.VisibleDateRange
Log("StartDate: " & DateUtils.TicksToString(tmp_m.Get("StartDate")))
Log("EndDate: " & DateUtils.TicksToString(tmp_m.Get("EndDate")))
 

Alexander Stolte

Expert
Licensed User
Update
1.04

  • B4J Support
    • DoubleClick on Bottom to Expand or Collapse
      • Depend on Expandable
  • Add Designer Property ShowFirstWeekOfMonthInFirstRow - if the calendar is expanded then the 1st week of the month will be in the 1st row
b4j.PNG

Suggestions for improvement of the handling in b4j are welcome.
 

Rubsanpe

Active Member
Licensed User
Hi. Error testing sample in B4A and B4J. I understand that the error is the one that was produced by the changes when adding options to ASViewPager, but in this case I do not have access in the example to ASViewPager.

B4X:
Ha ocurrido un error en la lĂ­nea: 109 (ASViewPager)
java.lang.RuntimeException: Cannot parse: null as boolean
    at anywheresoftware.b4a.BA.parseBoolean(BA.java:341)
    at anywheresoftware.b4a.BA.ObjectToBoolean(BA.java:410)
    at b4j.example.asviewpager._designercreateview(asviewpager.java:274)
    at b4j.example.ascalendaradvanced._ini_viewpager(ascalendaradvanced.java:2378)
    at b4j.example.ascalendaradvanced$ResumableSub_DesignerCreateView.resume(ascalendaradvanced.java:2237)
    at b4j.example.ascalendaradvanced._designercreateview(ascalendaradvanced.java:2120)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:632)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
    at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
    at anywheresoftware.b4j.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:79)
    at anywheresoftware.b4j.objects.LayoutBuilder.loadLayout(LayoutBuilder.java:110)
    at anywheresoftware.b4j.objects.PaneWrapper.LoadLayout(PaneWrapper.java:101)
    at anywheresoftware.b4a.objects.B4XViewWrapper.LoadLayout(B4XViewWrapper.java:503)
    at b4j.example.b4xmainpage._b4xpage_created(b4xmainpage.java:99)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:115)
    at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:81)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:460)
    at b4j.example.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:866)
    at b4j.example.b4xpagesmanager._showpage(b4xpagesmanager.java:345)
    at b4j.example.b4xpagesmanager._addpage(b4xpagesmanager.java:174)
    at b4j.example.b4xpagesmanager._addpageandcreate(b4xpagesmanager.java:188)
    at b4j.example.b4xpagesmanager._initialize(b4xpagesmanager.java:124)
    at b4j.example.main._appstart(main.java:84)
Rubén
 

Alexander Stolte

Expert
Licensed User
Update
1.05

  • Important BugFixes if the view is expanded
  • Add AppointmentType1 - dots under a date
    • Add SetAppointmentType1 - adds an appointment to a date
IMG_5012.jpg

It is the 1st version of the Appointments, suggestions for improvement are welcome. More functionalities are coming, like remove or edit.

Example:
Add an Appointment to the current date:
ASCalendarAdvanced1.SetAppointmentType1(DateTime.Now,xui.Color_ARGB(255,45, 136, 121))'green
 
Top