Android Question How to design for a 1280x720 layout at start?

markcrhome

Member
Licensed User
Longtime User
Hi all,
I am converting a windows exe to work on a smart phone. The original app has been designed to run at 1024x768

The main window has many edit boxes and labels etc

I need to replicate this on a landscape mode but when i use the b4a designer it tells me i need to use something with scale 1, but the target device is a motorola moto G running 1280x720 and the test b4a app i wrote suggets it uses a scale of 2, but the designer says the following...

---------------------------
Basic4android
---------------------------
It is not recommended to create variants with scales different than 1.0.

Do you want to normalize the values and add the following equivalent variant: 640 x 360, scale = 1 (160 dpi)?
---------------------------
Yes No Cancel
---------------------------

If I design at 640x360 how can I fit all the controls in?
Thanks
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

markcrhome

Member
Licensed User
Longtime User

So basically I just make the controls smaller to fit the 640 resolution, and they will expand to the larger resolution?
 
Upvote 0

markcrhome

Member
Licensed User
Longtime User

Still trying to understand that one...

The windows app is the following layout, and fills the clients computer screen as 1024x768



On my dev computer it doesnt, I don't want it to scale, just stay the designed size



So is it possible to define a layout that is 1280x720 to allow me to add the views at the actual size i want them to be shown?

I really don't want it to scale down for lower resolution screen as they are using a known screen size

P.S.

The scale factor of the moto g is 2, so how would i create a layout for that ?
 
Last edited:
Upvote 0

markcrhome

Member
Licensed User
Longtime User
You can create a variant with scale = 2. It is only a recommendation.

The layout you want to create will be unusable as it will be too small. However I'm sure that after some experiment you will better understand the scaling (dots per inch) concept.

Still blinking struggling to grasp scaling.

I have approx 70 controls to add to a panel, including labels and edittext boxes. I am used to WYSIWYG, so what I do in the designer is what i see on the screen, so truly lost here!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…