Advent Calendar by SteveJG
An Advent Calendar is a holiday tradition. It is a graphic means to provide a 'count down' to an event in the future using images and a calculation of time remaining prior to the event. This app is a digital version.
How it works
The most time consuming activity building this app is finding and sizing appropriate images.
Twenty-five Buttons in a Table provide the Advent Calendar graphic 'doors'. The app automatically calculates how many days until Christmas and notes the 'numerical day of Advent'.
Individual 'door's can be opened display images and text messages as Christmas gets closer (select a numbered button (representing the days of Advent)). Images only display during Advent. Images that pre date the actual day's date can be opened as anyone wants. The other images cannot be opened until the date associated with them arrives.
The small images in the Buttons are used to display the contents of each calendar 'window' or 'door'. Click the larger image to hide it and return to the Advent Day Buttons.
The app's 'engine' is
this code.The app displays something like this today
(actually the Advent doors will not display until Advent begins- image was from a previous version of the app)
(before the doors are allowed to open). The doors will look like this when the app is working
The most time consuming activity building this app is finding and sizing appropriate images. The holiday images are cut out from the jpg in the link https://www.smashingmagazine.com/2014/11/freebie-christmas-icon-set-ai-psd-eps-pdf-svg-png/ . The individual images are 146 x 146 pixels copied and re-labeled 1.png to 24.png and stored in Media.
The app uses the Any component Button controls make to provide Height and Width dimensions for the 'door' Buttons in the Table. The developer does not have to use the Designer Properties to set the dimensions. The when any Button.Click event handler controls all the Button 'doors'.
Here are the Blocks
Freely use the images in your version of the app (see the documentation terms in the provided link).
The app was tested on an Android 4.2.2 cell and an Android 8.1 tablet.
Want to peek? Temporarily re-set the date (of Christmas) by advancing the date in
Setting a data prior to Christmas will allow viewing all images (be prepared for some error messages you can ignore). You will not see any errors if you set the date to Christmas.
In practice, you probably will want to use your own images.
This is an Advent Calendar. It's structure can also be used as an app to 'advertise' and make you aware of an event in the future.
I hope you all have a safe and happy holiday season.
(an aia
AdventCalendar3.aia (686.3 KB)
- Steve