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

@ -9,11 +9,12 @@
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
<script type="text/javascript" charset="utf-8">
var deviceInfo = function(){
console.log('setting the dom nodes');
var deviceInfo = function(){
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() {
@ -103,8 +104,7 @@
function init(){
document.addEventListener("touchmove", preventBehavior, false);
document.addEventListener("deviceReady", deviceInfo, true);
console.log('we are in init');
document.addEventListener("deviceReady", deviceInfo, true);
}

View File

@ -25,7 +25,7 @@ public class AudioHandler implements OnCompletionListener, OnPreparedListener, O
public AudioHandler(String file, Context ctx) {
this.recording = file;
this.mCtx = ctx;
}
}
protected void startRecording(String file){
if (!isRecording){

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,15 +47,13 @@ public class PhoneGap{
private Context mCtx;
private WebView mAppView;
SmsListener mSmsListener;
DirectoryManager fileManager;
AudioHandler audio;
public PhoneGap(Context ctx, WebView appView) {
this.mCtx = ctx;
this.mAppView = appView;
mSmsListener = new SmsListener(ctx,mAppView);
fileManager = new DirectoryManager();
mSmsListener = new SmsListener(ctx,mAppView);
audio = new AudioHandler("/sdcard/tmprecording.mp3", ctx);
uuid = getUuid();
}