Android Question Why is my 800 x 1200 device showing the app at 540x800 ?

MitchBu

Well-Known Member
Licensed User
Longtime User
I am trying to design a layout with the connected device Galaxy Tab 4 SM-T530 which resolution is 800x1280 (portrait) at 160 dpi..

I went for variants "Match Connected Device", or "10" Tablet (portrait): 800x1280 scale = 1 (160 dpi)" which provide the same work area in the Designer.

Yet, once I run the app, it shows only approximately 540 x 800.

What am I missing ?

TIA
 

MitchBu

Well-Known Member
Licensed User
Longtime User
Either "Match Connected Device", or "10" Tablet (portrait): 800x1280 scale = 1 (160 dpi)".

In both cases, it work fine in the virtual designer, but not in the actual app.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
The problem is that in the Variants Tab in the Designer you have a variant for 320 x 480 scale 1 !
And in the DesignerScripts you have AutoScaleAll.

upload_2016-11-1_10-38-25.png


That's the answer to my question What variant are you using in the Variants Tab ? in post #2.

What exavtly do you want to do?
Have an application that runs on 'all' screen sizes or only on your specific device.
Depending on the answer the approch is not the same.

In your layout Panel1 has a width of 540 and a height of 790, why?
But PnlBitmap has a width of 800?
What exactly do you want to display and where?
 
Last edited:
Upvote 0

MitchBu

Well-Known Member
Licensed User
Longtime User
The problem is that in the Variants Tab in the Designer you have a variant for 320 x 480 scale 1 !

That's the answer to my question What variant are you using in the Variants Tab ? in post #2.

What exavtly do you want to do?
Have an application that runs on 'all' screen sizes or only on your specific device.

You have to forgive the beginner ; I mistook the choice on top of the designer layout for the choice of the actual variant. Now I know how to set it up in the Windows menu of the Designer. Thank you :)

You must add anchors (note the small white circles):

Using anchors the views will fill the available area.

See this: https://www.b4x.com/android/forum/threads/64112/#content

Great. I want indeed the top bar to fill the whole screen width. Now I know what to do.

Thank you Erel :)
 
Upvote 0
Top