User Tools

Site Tools


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

  • insert a time zone,
  • delete a time zone and
  • define a design for the elements in the Listview in 10 variants for the same layout.

The following three pictures show three different designs:

D1 D2 D3

Figures Watches with different designs

  • The images for the different dials were created with InkScape.
  • With methods of the class Paint the hands of the analog clocks are drawn at runtime.

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:


Figure 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.


Figure Dates for Wellington Point

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

The complete projects can be found in the download area.


The website uses a temporary session cookie. This technically necessary cookie is deleted when the browser is closed. You can find information on cookies in our privacy policy.
k17/k17.4/k17.4.2/start.txt · Last modified: 30.09.2023 by emma

Page Tools