17.4.2 Two Projects - ListView

You will be introduced to two projects that focus on the use of the ListView class.

Claus Dietrich's project demonstrates how you can present the data to be displayed in a special way with RichText and images on the elements in a ListView.

The context menu of the ListView allows you to

The following three pictures show three different designs:

D1 D2 D3

Figures 17.4.2.1: Watches with different designs

With the order:

Shell "timedatectl --no-pager list-timezones" To sTimeZoneList

the list of available time zones is imported from the operating system.

With the order:

Shell "zdump " & sTimeZone To sTime

the data of a time zone is retrieved from the operating system (database tzdata), then split into a string array, then parsed according to weekday, date and time for the time zone to be displayed and finally formatted for display in a suitable way:

Asia/Seoul Wed May 18 20:48:18 2016 KST

Ingo Beckert's project also displays data with rich text and images that are interactively loaded from the Internet. These basic data provide a selection of cities, countries or regions in the ListView and also display the corresponding national flag:

B4

Figure 17.4.2.2: Selection' Wellington'.

A double-click on an element in the ListView - in the example Wellington Point - shows the time zone, the day of the week, the date and the current local time. The data is supplemented by the time zone for the location and the differences to other time zones.

B5

Figure 17.4.2.3: Dates for Wellington Point

A click on the yellow display changes back to the selection → figure 17.4.2.2.2.

The complete projects can be found in the download area.

Download