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
 

Star-Dust

Expert
Licensed User
Longtime User
Upvote 0

eps

Expert
Licensed User
Longtime User
Although some caution with that link - Calendar access in the 'early days' was undocumented and then changed and permissions etc changed.
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Upvote 0

OliverA

Expert
Licensed User
Longtime User
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

KMatle

Expert
Licensed User
Longtime User
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

B4X:
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

Cableguy

Expert
Licensed User
Longtime User
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

whoami0260

New Member
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
Top