Android Question 2 CustomViewLists arranging by code

Tomas Petrus

Active Member
Licensed User
Longtime User
I have 2 CUstomListViews in Activity.

If one is empty I want to hide it and change height of the other one to 100% for example.

My tries looks like this
B4X:
MojeZakazkyClv.AsView.Height = 52dip * i
HomeClv.AsView.Top = HomeClv.AsView.Top + 52dip * i

first line should change height of the first list according to number of items - seems to doesnt work
second line move TOP of second list by 52dips * number of items in first list - seems to work

What is the correct approach ?
 
Last edited:

Tomas Petrus

Active Member
Licensed User
Longtime User
hmm..
I might not to know what is it : ))
but it was the only way to adjust scrollable area to the view that encapsulate it.
and its working :)
 
Upvote 0
Top