Moto qHD resolution

JesseW

Active Member
Licensed User
Longtime User
I just got a DROID Bionic with qHD (540x960) and it appears the density is the same as my DROID X at its lower resolution of 480x854.

I noticed because in my Recap app, I use the 'dip' modifier for all screen coordinates, and the scrollview, which I've set its width to 320dip, no longer fills the screen all the way across, as it has done on each device and emulator I've tested so far, but leaves a margin on the right side. It doesn't cause any problems other than aesthetics.

So it appears dip isn't dip anymore in qHD, not Moto's qHD anyway.

I programatically create the screen because there's almost 100 custom labels that are accessed in an array.

Any ideas?
 

JesseW

Active Member
Licensed User
Longtime User
Should I use 100%x for the scrollview width, then create a single row of labels using the designer and use the widths from the loaded layout?

This wont be too difficult to figure out, but if someones already created an elegant solution, I'd like to know. Or if anyone has any ideas please share...

Thanks
 
Upvote 0

JesseW

Active Member
Licensed User
Longtime User
I'm surprised theres no responses, since with the popularity of qHD growing, it will become an issue for everyone soon enough.

Is the best way to deal with this to use the designer to create a single row of labels with multiple variants for different screen res's, then use the loadlayout command on a dummy panel so I can retrieve sizes and build my grid? Just wondering if there's a better way.

Erel??? Klaus???

Thanks...
 

Attachments

  • qhd.jpg
    11.4 KB · Views: 251
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm surprised theres no responses, since with the popularity of qHD growing, it will become an issue for everyone soon enough.
I decided to stop answering during sleep after several wrong answers

So it appears dip isn't dip anymore in qHD, not Moto's qHD anyway.
dip feature is very simple. It takes every "pixel" value and multiplies it by the current device scale. So a 100dip wide button will be with the same physical size on all devices (more or less). However your device is larger than the "standard" layout and therefore you see the empty regions.

Using 100%x for the ScrollView will make it at the size of the current device. You can also create a layout variant in the designer with the exact details of this device.
 
Upvote 0

JesseW

Active Member
Licensed User
Longtime User
Ok, thanks its not particularly my device im concerned about, but market customers with the same setup.

I will play with this and report my findings.

In the meantime, is there a way to force the density from 240 to 270 and/or the scale from 1.5 to 1.6875?
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
You could either create several variants as suggested or, create a "standard" panel, put all your views there and "center it" on the device, of course, there will be a little space on either side of the screen but, in this case, since you have a black background it will look fine.

Just an idea.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
It depends on what you want to do:

- If you want to take advantage of the exrea space, then a specific layout would be the best.

- If you want to strech the views, you could use percentage values for the left and width values.
Label1.Left = 0
Label1.Width = 10%x
Label2.Left = Label1.Width + 2%x
Label2.Width = 15%x
Label3.Left = Label2.Left + Label2.Width + 2%x
Label3.Width = 15%x
etc.

I didn't answer before, I was away from home a few days.

Best regards.
 
Upvote 0

JesseW

Active Member
Licensed User
Longtime User
Thanks guys was hoping for a way to force a new scale so b4a would clean it up. Time to get to work...
 
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User
I just gotten bitten by this too. I thought I had covered just about anything with the 5 or so variants I put into my app and then heard from someone that everything is shifted to the upper-left on the EVO 3D, which after a Google search is also qHD (540x960).

I am thinking about creating yet another variant of all of my apps "screens" (but am verrrrrry tempted to change over to doing it in code if I can figure out the perfect formulas).

Quick question though, so I know I am getting it right: is qHD (540x960) scale 1 or 1.5? I want to be sure I have my emulator set up right otherwise I will be wasting my time on a layout variant that STILL won't look right.
 
Upvote 0

JesseW

Active Member
Licensed User
Longtime User
Scale for qhd on my bionic is 1.5, same as for 480x800 and 480x854 Motorola variations... Can't say for the Evo3d, but if someone complained, I bet its 1.5. It wont be 1, that's 320x480 hvga.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…