Note that there are some explanatory texts on larger screens.

plurals
  1. POPinch Zoom in Android with Phonegap and jQUERY Mobile
    primarykey
    data
    text
    <p>I have been having difficult getting pinch zoom to work in the webapp I am creating with Phonegap. Currently, I am loading information into a p tag view a remote script, but the html goes out of the confines of the screen (of course going to landscape mode fixes this).</p> <p>Not matter, what I try I can't get pinch zoom to work or even a horizantal scrollbar to appear. I tried adding &lt;<code>meta name="viewport" content="width=device-width, height=device-height, initial-scale=0.8, user-scalable=1" /&gt;</code> in the header.</p> <p>I think the problem may be that I am using jquery mobile, but trying the following solution did not work either:</p> <pre><code>$(document).bind("mobileinit", function(){ $.mobile.metaViewportContent = "width=device-width, minimum-scale=1, maximum-scale=2"; }); </code></pre> <p> (added before jquery mobile js file inclusions).</p> <p><strong>EDIT</strong>: Scrolling to the right when content overflows works fine in Ripple emulator.</p> <hr> <p><strong>UPDATE</strong>: Okay - edited my app.java and I am able to zoom now. However, I am only able to zoom in, not zoom out, indicating that the initial zoom is set to 1 I guess. Anyone have any suggestions as to how to zoom out or set up a horizontal scroll bar?</p> <pre><code>package com.phonegap.Sample; import android.app.Activity; import android.os.Bundle; import com.phonegap.*; import android.webkit.WebSettings; public class Sample extends DroidGap { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.loadUrl("file:///android_asset/www/index.html"); WebSettings ws = super.appView.getSettings(); ws.setSupportZoom(true); ws.setBuiltInZoomControls(true); } } </code></pre> <p><a href="https://stackoverflow.com/questions/4668344/zoom-in-phonegap-for-android">source</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload