MitchBu Well-Known Member Licensed User Longtime User Nov 8, 2016 #1 I may have a variable number of items to display in a ListView, so I would like to adjust the height of the view according to content. Is there any way to get the row height in code ?
I may have a variable number of items to display in a ListView, so I would like to adjust the height of the view according to content. Is there any way to get the row height in code ?
MitchBu Well-Known Member Licensed User Longtime User Nov 8, 2016 #2 OK. I found the way to do it, so I post it here in case someone was looking for the same information : B4X: Log("Height: " & ListView1.SingleLineLayout.ItemHeight) The same property can be changed to modify row height : B4X: ListView1.SingleLineLayout.ItemHeight = 30 Upvote 0
OK. I found the way to do it, so I post it here in case someone was looking for the same information : B4X: Log("Height: " & ListView1.SingleLineLayout.ItemHeight) The same property can be changed to modify row height : B4X: ListView1.SingleLineLayout.ItemHeight = 30
Erel B4X founder Staff member Licensed User Longtime User Nov 9, 2016 #3 Note that it is easier to work with CustomListView: https://www.b4x.com/android/forum/threads/19567 Upvote 0
MitchBu Well-Known Member Licensed User Longtime User Nov 9, 2016 #4 Yes, I have seen it. I have bookmarked the page to look into it later. Thank you Erel. Upvote 0