F Fox Active Member Licensed User Longtime User Aug 16, 2011 #1 How can i check the Display Resolution and say if i have 240 x 400 then... or if i have 320 x 480... by Code not by Designer...!?
How can i check the Display Resolution and say if i have 240 x 400 then... or if i have 320 x 480... by Code not by Designer...!?
M Merlot2309 Active Member Licensed User Longtime User Aug 16, 2011 #2 Hello, ToastMessageShow(Activity.Width, true) should do the job (or .Height) Helen Upvote 0
M magalt Member Licensed User Longtime User Aug 16, 2011 #3 Maybe I'm wrong but one size does not include the size of the title bar (the height for landscape). Marco Upvote 0
Maybe I'm wrong but one size does not include the size of the title bar (the height for landscape). Marco
F Fox Active Member Licensed User Longtime User Aug 16, 2011 #4 Thanks for both answers i have tried this: Dim resolution As Int Dim p As Phone resolution=GetDeviceLayoutValues.Height If resolution >= 320 Then ListView1.SingleLineLayout.Label.TextSize = 16dip Else ListView1.SingleLineLayout.Label.TextSize = 7dip End If Last edited: Aug 16, 2011 Upvote 0
Thanks for both answers i have tried this: Dim resolution As Int Dim p As Phone resolution=GetDeviceLayoutValues.Height If resolution >= 320 Then ListView1.SingleLineLayout.Label.TextSize = 16dip Else ListView1.SingleLineLayout.Label.TextSize = 7dip End If
nfordbscndrd Well-Known Member Licensed User Longtime User Aug 17, 2011 #5 You might also want to look at: Designer - Basic4android Wiki Upvote 0