简体   繁体   中英

Make the web application fit the mobile screen size

I'm using PhoneGap to create application on Android, but the size of the application page doesn't fit with the mobile screen size.

I have found this code:

WebView browser = (WebView) findViewById(R.id.webview);
browser.getSettings().setLoadWithOverviewMode(true);
browser.getSettings().setUseWideViewPort(true);

but I don't know where to put it, the application stops working.

Can any one help please? Thanks in advance.

If you want to be full responsive and have an application that fit the mobile screen size, the tablet screen size and the desktop web browser screen size, try to take a look to these UI frameworks made for mobile devices :

These frameworks include meta tag and stuff to fit all screen sizes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM