Android Question Set Panel heigth in normal ListView

GMan

Well-Known Member
Licensed User
Longtime User
I am using this code for a standard listview.
Due as the item heigth is so high the visible part wouldnt change the heigth, no matte what numbers i give

B4X:
        ListViewNummern.TwoLinesAndBitmap.ImageView.SetLayout(0dip, 350dip, 400dip , 350dip)
        ListViewNummern.TwoLinesAndBitmap.ItemHeight = 350dip

Even this make no changes

B4X:
        ListViewNummern.TwoLinesAndBitmap.ImageView.SetLayout(0dip, 400dip, 400dip , 400dip)
        ListViewNummern.TwoLinesAndBitmap.ItemHeight = 400dip
        ListViewNummern.TwoLinesAndBitmap.Label.Height = 200dip
        ListViewNummern.TwoLinesAndBitmap.secondLabel.Height = 200dip
 
Last edited:

Filippo

Expert
Licensed User
Longtime User
I am using this code for a standard listview.
Due as the item heigth is so high the visible part wouldnt change the heigth, no matte what numbers i give

B4X:
        ListViewNummern.TwoLinesAndBitmap.ImageView.SetLayout(0dip, 350dip, 400dip , 350dip)
        ListViewNummern.TwoLinesAndBitmap.ItemHeight = 350dip

Even this make no changes

B4X:
        ListViewNummern.TwoLinesAndBitmap.ImageView.SetLayout(0dip, 400dip, 400dip , 400dip)
        ListViewNummern.TwoLinesAndBitmap.ItemHeight = 400dip
        ListViewNummern.TwoLinesAndBitmap.Label.Height = 200dip
        ListViewNummern.TwoLinesAndBitmap.secondLabel.Height = 200dip
You cannot have different heights in a standard list view.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
What exactly is your problem ?
The values you set with ListViewNummern.TwoLinesAndBitmap.xxx are valid for all items in the ListView.
You cannot have items with different dimensions.
To change the width or height of the ListView itself, you must use ListViewNummern.Width = xxx and ListViewNummern.Height = yyy

If you need to have items with different dimensions you should switch to CustomListView which is also cross-platform.
 
Upvote 0

GMan

Well-Known Member
Licensed User
Longtime User
What exactly is your problem ?
The values you set with ListViewNummern.TwoLinesAndBitmap.xxx are valid for all items in the ListView.
You cannot have items with different dimensions.
To change the width or height of the ListView itself, you must use ListViewNummern.Width = xxx and ListViewNummern.Height = yyy

If you need to have items with different dimensions you should switch to CustomListView which is also cross-platform.
The only problem is the visual heigth of each entry.
i got it that i couldnt have different heigths (even it is configurable by code), but the overall heigth of each entry is the problem i have
 
Upvote 0
Top