When I first ran the program I got an error in this line in the CustomCalendar module:
Public NmFullday(7) As String : NmFullday = Main.Local.WeekDays
I found 'strange' that in the Class there is a reference to an object in Main.
Then, I was looking what kind of object Local was, where and how it was declared.
I saw that Local is an AHLocale object from the AHLocale library.
I saw that Local was not used in Main, so I moved the declaration to CustomCalendar.
It is no more good practice to set values (
NmFullday = Main.Local.WeekDays in this case) in the Process_Globals, Class_Globals or Global routines so I moved these instructions from Class_Globals to Initialize.
Then, running the program, I got an error NullPointerExeption.
This error appears mainly when an object is not initialized.
I had a look at the help for the AHLocale library if there is an Initialize method.
I saw that AHLocale has Initialize methods, but no
Local.Initialize in the code.
I added it and it works.
You should also look at the compiler Warnings in the Logs and correct the code accordingly. I know it's a test program so a part of the warnings are due to this fact, but others (for example missing variable type declaration) should be corrected.
I have a doubt, why without your changes the code runs on android 4.x.x?
I don't know why.
So I tested now your original code on my Asus tablet with Android version 4.2.1 and get the same error as with Android 5.1.1 on the xperia !?