I have a simple HTML file with a canvas component, when I load it into the Android web browser, it shows everything, but when I try to load it from my application inside a WebView, nothing is displayed.
I tried to load the same file from a local web server, and it didn't work. What am I doing wrong?
Here the code:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mWebView = new WebView(this);
setContentView(mWebView);
mWebView.setWebChromeClient(new WebChromeClient());
}
@Override
protected void onDestroy() {
super.onDestroy();
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
}
@Override
protected void onResume() {
super.onResume();
mWebView.loadUrl("http://10.0.10.92:8000");
}
If the web page contains "normal" HTML, everything works. It just seems to be a problem with the canvas element.
Aucun commentaire:
Enregistrer un commentaire