Terbaddo Posted September 2, 2010 Share Posted September 2, 2010 Bonjour, j'essaye d'integrer WebKit dans une application Android. Pour l'instant, j'ai ça: package com.terbaddo.webkittest; import android.app.Activity; import android.view.Window; import android.widget.Toast; import android.os.Bundle; import android.webkit.WebView; import android.webkit.WebViewClient; import android.webkit.WebChromeClient; public class WebKitTestActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); WebView webview = new WebView(this); setContentView(webview); webview.getSettings().setJavaScriptEnabled(true); webview.setWebViewClient(new WebViewClient() { public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { Toast.makeText(activity, description, Toast.LENGTH_SHORT).show(); } }); webview.loadUrl("http://www.google.fr/"); } } mais ça marche pas dans l'émulateur, alors qu'avec le navigateur par défaut ça marche... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.