Android Question How to code the attached list

Discussion in 'Android Questions' started by Alberto Michelis, Feb 18, 2015.

  1. Alberto Michelis

    Alberto Michelis Active Member Licensed 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?
    Thanks TDscreen.png
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. KMatle

    KMatle Expert Licensed 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: http://www.b4x.com/android/forum/threads/for-beginners-playing-with-views-dynamic.44621/

    This example uses absolute coordinates for the views and does not take care of different screen resolutions.
     
    lemonisdead likes this.
  4. Erel

    Erel Administrator Staff Member Licensed User

    I recommend you to use CustomListView class which already implements the above points.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice