Getting started
...
Create an app from scratch
Customize the Hello-Jigx solut...

Change an icon and add a badge

5min

Overview

You can easily customize widgets on the

 by changing their icons and adding additional components such as badges to the widgets. In this section, you learn to change the calendar icon and add a badge using an expression on the calendar

to show the number of calendar events for the week.

For a view of the icons in a list see the Types - List - List with all icons in the jigx-samples solution available in Quick start.

Solution with Calendar -3 icon
Solution with Calendar -3 icon

Solution with calendar badge
Solution with calendar badge


Steps

Change an widget icon

  1. Open the Hello-
    
    solution in
    
    in
    
    , click on the calendar.jigx file.
  2. Replace icon: calendar-3 with icon: calendar.

Add a badge to the calendar widget

  1. Under icon add a new line for the badge code that shows the number of calendar events for the week. Add badge: Then use the =$count(@ctx.datasources.calendar-data.id) expression to count the events in the calendar and show the number in the badge on the
    
    .

calendar.jigx


4. Save and publish the Hello-

 solution. 5. Run the Hello-

solution on your mobile device to see the change to the calendar icon and see the badge displaying 3 events for the week on the

.