Android Question how to create calendar??

whoami0260

New Member
hi im a newbie in b4a.. our teacher want us to add a calendar in our project.

can you teach me how to create a calendar.. thanks in advance
 
Upvote 0
Although some caution with that link - Calendar access in the 'early days' was undocumented and then changed and permissions etc changed.
 
Upvote 0
Upvote 0
our teacher want us to add a calendar in our project
Curiosity: Is your class is using B4A or are you using B4a (on your on volition) for the class project? Does the teacher want you to use a library or come up with something from scratch?
 
Upvote 0
come up with something from scratch

I assume the teacher wants them to create (not copy & paste) a calendar.

So @whoami0260 :

As a month has 31 days max., just add 31 labels to the activity. Start with the current month and use a loop to fill the labels. Start with 1 (first day of the month). Use the date functions: https://www.b4x.com/android/help/core.html#datetime to add 1 day for the next day and so on. If the day changes to 1 again, stop (exactly: September has 30 days. If you add another day with

Code: Copy
DateTime.Add(DateTime.Now, 0, 0, 1)

the sequence ist 27th, 28th, 29th, 30th, 1st of October -> don't display because next month).

You can get the day, month very easy (see the link) to display it. The rest is up to you. Have fun!
 
Upvote 0
Also, beware, as an unlicensed user your IDE usage is somewhat limited!
The major limitation is, no external libs, other than the core ones
 
Upvote 0
No.. our teacher dont taught us android programming.. they say you need a unique tittle.. that why i was using b4a..

sorry for wrong english.. LoL...


Im creating a family planning application.. and after my teacher see my system. He want me to add a period tracker..
 
Upvote 0
Back
Top