Designer & Scaling & AVDs

RichardN

Well-Known Member
Licensed User
Longtime User
I originally wrote a (portrait only) application for the HTC Desire 800x400 display. I used the Designer variant of 400x800,scale = 1.5 (240dpi). It works fine on the target device as well as in my AVD of the same settings.

After layout completion I later added the 480x320 scale=1,160dpi option and all the dimensions look right.

Recently a colleague installed the app on a Samsung Galaxy Mini (GT-S5570) which is 240x320 and when he ran the app I guess the 480x320 layout was loading as he could not see the bottom of the screen. Understandable as this device has a different aspect ratio.... although if I get the variant values correct I could squeeze the views to fit.

I would like to create a variant for the (GT-S5570) device for this app. I understand the target platform it is 240x320 hw.lcd.density = 180 so have created an AVD with those values. In the designer there is no option for 240x320 so it is a manual entry but at what scale ??? I have tried several values so far but the AVD only ever appears to display the top left 240x320 portion of a 480x800 image!

I feel I am missing something fundamental here. Anybody help?
 

RichardN

Well-Known Member
Licensed User
Longtime User
Thanks Arel,

There is a lot of scope for confusion here. As the aspect ratios of the Designer variants are all different... the Designer appears to take a good stab at new x/y coordinates when a variant is added. However when manually adding a 240x320 the x/y values of the new variant all remained as for the Designer preset 480x800 variant.

Is this intentional ?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
There is no difference between the built-in variants and other manually created variants.
All the designer does when you create a new variant (by choosing one or creating a new one) is to change the views size and position based on the scale difference.

The abstract designer which will be available in the next version will make it easier to manage multiple layouts variants.
 
Upvote 0

nfordbscndrd

Well-Known Member
Licensed User
Longtime User

You might want to take a look at this Documentation Wiki page.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…