Android Question How to code the attached list

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
Hi, I own a licence of B4A and I need to program an app with as creen like the atached image.
Also there are more columns that the user can see using the header arrows.
Any example of how to do it?


Licensed User
Longtime User
Welcome to the forum

You can do it on your own (to learn how to handle views)

  1. Take a scrollview and add it to the Activity (or to another panel you add)
  2. In a loop add 4 labels per row (or as many as you like) to the sv's panel (sv.panel.addview...)
  3. add as many rows you need
  4. adjust the sv.panel's height
  5. fill the labels as you like and play with the colors
  6. add some imageviews for the icons
  7. all views can be mixed like you want
Happy scrolling and don't forget to initialize the views before using

Getting access to the views you've created at runtime is done by getting them from the parent (= where you've added them). A better way is to store them in a list.

Here is a sample:

This example uses absolute coordinates for the views and does not take care of different screen resolutions.
Upvote 0