F fraxinus Member Licensed User Longtime User May 13, 2012 #1 Hi all What Density should I use for development of the HTC One phone the specs are: 720 x 1280 pixels, 4.7 inches (~312 ppi pixel density) thanks Rob
Hi all What Density should I use for development of the HTC One phone the specs are: 720 x 1280 pixels, 4.7 inches (~312 ppi pixel density) thanks Rob
M Mahares Expert Licensed User Longtime User May 13, 2012 #2 312 ppi pixel density results in a scale of approximately 2. If you use a layout variant of 360x640 with a scale of 1, you should be good to go. If I misunderstood the question, please ignore. Upvote 0
312 ppi pixel density results in a scale of approximately 2. If you use a layout variant of 360x640 with a scale of 1, you should be good to go. If I misunderstood the question, please ignore.
Erel B4X founder Staff member Licensed User Longtime User May 14, 2012 #3 Mahares is correct. It should be a scale of 2.0. I recommend you to go over this link before creating a variant specific for this device: http://www.b4x.com/forum/basic4andr...ing-multiple-screens-tips-best-practices.html Upvote 0
Mahares is correct. It should be a scale of 2.0. I recommend you to go over this link before creating a variant specific for this device: http://www.b4x.com/forum/basic4andr...ing-multiple-screens-tips-best-practices.html
F fraxinus Member Licensed User Longtime User May 14, 2012 #4 Thank you Mahares. I'll give it a try. I've been using the following(last on list) for this device but the owner gets a black screen when trying to run app. The rest are working on various devices. So how would I incorporate your recomendations. Thanks again for your help. Rob LayoutVal = GetDeviceLayoutValues Dim Dens As Float Dens = Density If LayoutVal.Width <=240 AND Dens = 0.75 Then LayoutWidth = 240 Activity.LoadLayout("Main240x320") DeviceType = Dim240x320 Else If LayoutVal.Width <=240 AND Dens = 1 Then LayoutWidth = 240 Activity.LoadLayout("Main240x320") DeviceType = Dim240x320 Else If LayoutVal.Width =320 AND Dens = 1 Then LayoutWidth = 320 Activity.LoadLayout("Main320x480") DeviceType = Dim320x480 Else If LayoutVal.Width = 480 AND Dens = 1.5 Then LayoutWidth = 480 Activity.LoadLayout("Main480x800") DeviceType = Dim480x800 Else If LayoutVal.Width = 600 AND Dens = 1.5 Then LayoutWidth = 600 Activity.LoadLayout("Main600x1024") DeviceType = Dim600x1024 Else If LayoutVal.Width >= 800 AND Dens = 1 Then LayoutWidth = 800 Activity.LoadLayout("main800x1280") DeviceType = Dim800x1280 Else If LayoutVal.Width >= 720 AND Dens = 1.5 Then LayoutWidth = 720 Activity.LoadLayout("main720x1280x15") DeviceType = Dim720x1280 Else If LayoutVal.Width >= 720 AND Dens = 2 Then LayoutWidth = 720 Activity.LoadLayout("main720x1280x2") DeviceType = Dim720x1280 End If Upvote 0
Thank you Mahares. I'll give it a try. I've been using the following(last on list) for this device but the owner gets a black screen when trying to run app. The rest are working on various devices. So how would I incorporate your recomendations. Thanks again for your help. Rob LayoutVal = GetDeviceLayoutValues Dim Dens As Float Dens = Density If LayoutVal.Width <=240 AND Dens = 0.75 Then LayoutWidth = 240 Activity.LoadLayout("Main240x320") DeviceType = Dim240x320 Else If LayoutVal.Width <=240 AND Dens = 1 Then LayoutWidth = 240 Activity.LoadLayout("Main240x320") DeviceType = Dim240x320 Else If LayoutVal.Width =320 AND Dens = 1 Then LayoutWidth = 320 Activity.LoadLayout("Main320x480") DeviceType = Dim320x480 Else If LayoutVal.Width = 480 AND Dens = 1.5 Then LayoutWidth = 480 Activity.LoadLayout("Main480x800") DeviceType = Dim480x800 Else If LayoutVal.Width = 600 AND Dens = 1.5 Then LayoutWidth = 600 Activity.LoadLayout("Main600x1024") DeviceType = Dim600x1024 Else If LayoutVal.Width >= 800 AND Dens = 1 Then LayoutWidth = 800 Activity.LoadLayout("main800x1280") DeviceType = Dim800x1280 Else If LayoutVal.Width >= 720 AND Dens = 1.5 Then LayoutWidth = 720 Activity.LoadLayout("main720x1280x15") DeviceType = Dim720x1280 Else If LayoutVal.Width >= 720 AND Dens = 2 Then LayoutWidth = 720 Activity.LoadLayout("main720x1280x2") DeviceType = Dim720x1280 End If
Erel B4X founder Staff member Licensed User Longtime User May 15, 2012 #5 I highly recommend you to implement your layout in a different way (see the link in my previous post). Such a list is not needed and makes your app unnecessary complicated. Upvote 0
I highly recommend you to implement your layout in a different way (see the link in my previous post). Such a list is not needed and makes your app unnecessary complicated.
F fraxinus Member Licensed User Longtime User May 16, 2012 #6 Thank you Erel, you are,as usual correct. I have just purchased version 1.9 and and will try my best to implement the Designer Script in my App. yours Rob:sign0098: Upvote 0
Thank you Erel, you are,as usual correct. I have just purchased version 1.9 and and will try my best to implement the Designer Script in my App. yours Rob:sign0098: