Android Question ListView with squared items

ThePuiu

Active Member
Licensed User
Longtime User
Is there a library that can build a listview similar to the one attached? It must support vertical scrolling, self-alignment of items and click item. If not, how can such a control be simulated?
Thank you!
 

Attachments

  • complete-epos.png
    complete-epos.png
    141.9 KB · Views: 311

ThePuiu

Active Member
Licensed User
Longtime User
There are two controls in the attached image: first one allows the vertical scroll, and the lower one allows a single row and scroll only horizontally. If there is no control with similar behavior, how can I best simulate their behavior?
 
Upvote 0

udg

Expert
Licensed User
Longtime User
If there is no control with similar behavior, how can I best simulate their behavior?
If using CLV, just prepare a layout with two of them: one in the upper area for the "matrix" items and a second one in the lower area of your layout for the horizontal-scrolling one. This "second CLV" could indeed be a simpler HorizontalScrollView (so your design will be CLV+HSV).
Self-aligment: you compute the relative position when adding each item, so it's done in code.
Click events: no problem; use a single click event and Sender to know which item was clicked.
 
Upvote 0

ThePuiu

Active Member
Licensed User
Longtime User
Based on Klaus example and with udg's explanations I'll start to build it! Hope I'll don't have any problems with ItemClick event...
 
Upvote 0

ThePuiu

Active Member
Licensed User
Longtime User
I have a problem ... it is not strictly related to this topic but: although in the designer appears correctly (pics a.jpg) on my tablets it appears truncated (pics b.png). The code used is: Scale.SetReferenceLayout (800, 1280, 1) What do not I do well?
 

Attachments

  • a.jpg
    a.jpg
    128.9 KB · Views: 236
  • b.png
    b.png
    37.9 KB · Views: 230
Upvote 0
Top