Android Question Dealing with screen resolutions

wl

Well-Known Member
Licensed User
Longtime User
Hi,

In my app I was using the Listview (AddTwoTextBoxesAndBitmap2): it seemed great on both my Phone as my tablet, but it lacked the possibility to cope with long texts.

Therefore I started to use the CustomListView, but here I run into trouble while displaying the two labels one below the other:

B4X:
result.AddView(iv, 5, 10, 40, 40)
result.AddView (lbl1, 60, 5, textWidth, 14) 'Text height of label 14
result.AddView(lbl2, 60, 5 + 16, textWidth, 12) 'Tekst height of label 12

On my tablet the texts are one below the other, but on my Phone texts overlap.

How can I deal with this ? What's the reason ?

Thanks
 

wl

Well-Known Member
Licensed User
Longtime User
thanks Erel, I will need to reread the tutorial.

But still I find it strange that when I used absolute positions and the same font on 1 device the tekst overlaps and on the other there is plenty of room between the labels
 
Upvote 0

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
Thanks nfordbscndrd and thanks Erel: I will have a look at it !

Thanks Klaus: while peparing a demo I had a look in the code of the customlistview, and I think I figured it out. I attached the demo.
 

Attachments

  • customlistview demo.zip
    4.6 KB · Views: 141
Last edited:
Upvote 0
Top