Fixes to rendering of Webkit on browser

This commit is contained in:
Joe Bowser 2009-11-12 10:51:22 -08:00
parent 72a6748987
commit 99cdf9686d
5 changed files with 15 additions and 8 deletions

View File

@ -1,6 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.phonegap" android:versionName="1.1" android:versionCode="3">
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizeable="true"
android:anyDensity="true"
/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

View File

@ -10,10 +10,11 @@
<script type="text/javascript" charset="utf-8">
var deviceInfo = function(){
console.log('setting the dom nodes');
document.getElementById("platform").innerHTML = device.platform;
document.getElementById("version").innerHTML = device.version;
document.getElementById("uuid").innerHTML = device.uuid;
console.log("Height:" + window.innerHeight);
console.log("Width:" + window.innerWidth);
}
var getLocation = function() {
@ -104,7 +105,6 @@
function init(){
document.addEventListener("touchmove", preventBehavior, false);
document.addEventListener("deviceReady", deviceInfo, true);
console.log('we are in init');
}

View File

@ -37,6 +37,7 @@ import android.webkit.JsResult;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebSettings.LayoutAlgorithm;
public class DroidGap extends Activity {
@ -68,6 +69,7 @@ public class DroidGap extends Activity {
WebSettings settings = appView.getSettings();
settings.setJavaScriptEnabled(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
/* Bind the appView object to the gap class methods */

View File

@ -47,7 +47,6 @@ public class PhoneGap{
private Context mCtx;
private WebView mAppView;
SmsListener mSmsListener;
DirectoryManager fileManager;
AudioHandler audio;
public PhoneGap(Context ctx, WebView appView) {
@ -55,7 +54,6 @@ public class PhoneGap{
this.mAppView = appView;
mSmsListener = new SmsListener(ctx,mAppView);
fileManager = new DirectoryManager();
audio = new AudioHandler("/sdcard/tmprecording.mp3", ctx);
uuid = getUuid();
}