Android Question fine-tuning 2 side-by-side clvs

toby

Well-Known Member
Licensed User
Longtime User
I want the screen to be split into left half and right half of equal width. Each side contains a label and customlistview.

Problems I'm having:
1. Right side is wider than the left side.
2. Some chars are not visible on the left side.

I've tried by anchoring and designer scripts to no vail. I would appreciate if someone could show me how to achieve what I want.

test app and screenshot attached.

TIA
 

Attachments

  • sideBySide.jpg
    sideBySide.jpg
    127.3 KB · Views: 46
  • sideBySideClvs.zip
    19.7 KB · Views: 43
Solution
You could do this without the panels...
1675571622455.png

Set the width of the labels and customlistviews to the same width for instance 160.
Use vertical anchors with the customlistviews and set the designer script to the following:
designer script:
'All variants script
'AutoScaleAll
lblAvailable.SetLeftAndRight(0%x,49%x)
lblAddedItems.SetLeftAndRight(50%x,99%x)
clv1.SetLeftAndRight(0%x,49%x)
clv2.SetLeftAndRight(50%x,99%x)
The AutoScaleAll is commented because the scaling is done by the other settings.
This should give you the result you see above.

PaulMeuris

Active Member
Licensed User
You could do this without the panels...
1675571622455.png

Set the width of the labels and customlistviews to the same width for instance 160.
Use vertical anchors with the customlistviews and set the designer script to the following:
designer script:
'All variants script
'AutoScaleAll
lblAvailable.SetLeftAndRight(0%x,49%x)
lblAddedItems.SetLeftAndRight(50%x,99%x)
clv1.SetLeftAndRight(0%x,49%x)
clv2.SetLeftAndRight(50%x,99%x)
The AutoScaleAll is commented because the scaling is done by the other settings.
This should give you the result you see above.
 
Upvote 1
Solution
Top