Software Archive
Read-only legacy content
17061 Discussões

Problem resolution LENOVO A5500-F

g_5_
Principiante
1.246 Visualizações

Hello,

1) I created a new application and in css set the page size of 1280 x 800 px.

2) I created and downloaded build

3) I uploaded the app to your tablet

4) Run app in tablet

My tablet has a resolution of 1280 x 800 px, application is longer by about 30% :-(

run script in webbrowser = result 1280 x 736 px
var width = screen.width;
var height = screen.height;

run script in app = result 962 x 553 px
var width = screen.width;
var height = screen.height;

Please someone help? Thank you very much..

 

0 Kudos
7 Respostas
Swati_S_Intel1
Funcionário
1.246 Visualizações

Make sure you are using the viewport meta tag.

 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

g_5_
Principiante
1.246 Visualizações

I attach PrintScreen...

 

1.png

2.png

4.png

 

g_5_
Principiante
1.246 Visualizações

Yes I have.. any other ideas? Thank you.

Swati_S_Intel1
Funcionário
1.246 Visualizações

Use

overflow: hidden;

in your CSS.

g_5_
Principiante
1.246 Visualizações

I spit on some css. I want to know why the body size does not fit on the screen !!

Swati_S_Intel1
Funcionário
1.246 Visualizações

The purpose of the viewport meta tag is to scale your app's content for different device sizes. When you use viewport the body content of the app assumes the size of the viewport and hence you should not use absolute px for the size. Whenever needed to specify size of elements you should use relative size (%) and not absolute px. To answer your question why body size does not fit the screen - notice that your device under test has viewport of 1080x1920 and the CSS pixel ratio is 2.5, that leaves CSS pixels to 432x768. Also, you have to consider the margin for the skin for the device, so the effective size will be slightly smaller. 

Some tips on UI development for mobile : You can achieve scaling and responsiveness with CSS, but it is best to use mobile UI framework such as jQuery Mobile, App Framework, Framework 7 etc. to avoid discrepancies in UI on different platforms and screen sizes.

g_5_
Principiante
1.246 Visualizações

That is the problem. Very much and thank you..

Responder