If you setSetDateTimeLocale(GetPreferredLanguage)
before you callCreateCalendar
then no error occurs.
But why, i dont know.
This line is affected then:
But this has nothing to do with the view, because if I add this line after I set the locale with your code, then it also crashes outside of the view.B4X:Log(DateUtils.SetDate(DateTime.GetYear(ticks),DateTime.GetMonth(ticks),DateTime.GetDayOfMonth(ticks)))
It looks like you have to set "SetDateTimeLocale" directly to app start so that no error occurs.
B4X:SetDateTimeLocale(GetPreferredLanguage) Log(DateUtils.SetDate(DateTime.GetYear(DateTime.Now),DateTime.GetMonth(DateTime.Now),DateTime.GetDayOfMonth(DateTime.Now)))'crash outside of the view' DateTime.DateFormat = "EEEE dd MMMM" Label1.Text = DateTime.Date(DateTime.Now) 'SetDateTimeLocale("EN-en")
Return DateUtils.SetDate(DateTime.GetYear(ticks),DateTime.GetMonth(ticks),DateTime.GetDayOfMonth(ticks))
....
ASCalendarAdvanced1.Close
Sleep(100)
SetDateTimeLocale(GetPreferredLanguage)
DateTime.DateFormat = "EEEE dd MMMM"
Label1.Text = DateTime.Date(DateTime.Now)
should be work nowI've discovered two bugs which are visible in the demo code.
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
ASCalendarAdvanced1.AddAppointmentType3(DateUtils.AddPeriod(DateTime.Now,p),xui.Color_ARGB(255,45, 136, 121),xui.Color_Magenta)
ASCalendarAdvanced1.AppointmentType3_ItemPropertiest.corner_radius=20dip
Had not checked internally if the calendar was already built, thus it tried to update the visual area that was not yet built.Setting BodyColor or OtherMonthBackgroundColor or setOtherMonthBackgroundColor in B4XPage_Created results in
B4X:java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
A date is a "Long" datatype and a color an "Int", apparently he had no problem with the color, because it was a valid date.seems to be an allowed syntax? I'm not passing through an end date. This results in a weird visual behaviour (left side of the magenta color is rounded, right side is rectangular).
try it now.does not change anything?
addedRequest: is it possible to add a horizontal alignment property for the labels in AppointmentType2 (left/center/right)?
In that case, here is some new materialOnly makes the product better
ASCalendarAdvanced1.expand
ASCalendarAdvanced1.Updateall
Error occurred on line: 382 (ASViewPager)
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
dont call this before you call "CreateCalendar"ASCalendarAdvanced1.Updateall
Read the function descriptions.2. it seems that the parameter setExtraItemGap is not doing anything at all. No matter what value I put there, nothing changes on the calendar.
ASCalendarAdvanced1.CurrentDateProperties.TextFont = xui.CreateDefaultBoldFont(20)
ASCalendarAdvanced1.CurrentDateProperties.TextColor = xui.Color_Black
ASCalendarAdvanced1.CurrentDateProperties.IndicatorColor = xui.Color_ARGB(100,255,255,255)
ASCalendarAdvanced1.CurrentDateProperties.IndicatorCornerRadius = 5dip
ASCalendarAdvanced1.CommitStyleChanges
ASCalendarAdvanced1.AppointmentType1_ItemPropertiest.Padding = 10dip
ASCalendarAdvanced1.AppointmentType1_ItemPropertiest.Height = 7dip
You need the ASViewPager.Where is the problem?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?