This is a migrated thread and some comments may be shown as answers.

viewport width ignored on android

1 Answer 111 Views
Google Android
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alexander
Top achievements
Rank 1
Alexander asked on 27 Jan 2014, 09:59 AM
Hi,
the content of our app was developed for a device width of 480px.
In order to support different device types we Need the viewport meta tag feature or something compareable.
For iOS there is a possibility to set the "EnableViewportScale" to true.
But how to activate this for Android?

It seams that the viewport meta tag is completelly ignored by the internal WebView control.
Research on the Internet confirms this assumption.
http://www.digitalprimates.net/author/dilillo/2013/09/16/scaling-fixes-for-android-devices-in-phonegap/

As described in the attached link, there is a possibility using this.appView, but there is no chance to do such things going the AppBuilder way, right?
So, how to solve the problem?
Is there any chance, or do we have to develop our own native wrapper?

Thx in advance

Regards

Alexander

1 Answer, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 30 Jan 2014, 01:55 PM
Hi Alexander,

As you have found out this is a common Cordova issue. Unfortunately, the suggested approach in the link is not applicable for AppBuilder projects.

I found a thread, where the using of content="target-densitydpi=device-dpi; user-scalable=no" is suggested with some additional setups on onDeviceReady. Here is the link to it.

I hope it helps.

Regards,
Kaloyan
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Google Android
Asked by
Alexander
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Share this question
or