This is currently becoming very unpleasant. Everything seems to be correct, but I get a "webpage unavailable" in the webview area. The webpage in the file: ///android_assets/test.html may be temporarily disabled or ..... When I encoded a fast html page with a string in the same area .. did it work?
my code is:
import android.os.Bundle; import android.webkit.WebView; import android.app.Activity; public class ProtoActivity extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webView; webView = (WebView) findViewById(R.id.webView1); webView.getSettings().setJavaScriptEnabled(true); webView.loadUrl("file:///android_assets/test.html"); } }
source share