Issue
Hell got a very simple app,
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
public class main extends Activity {
WebView mWebView;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mWebView = (WebView) findViewById(R.id.webView1);
mWebView.getSettings().setJavaScriptEnabled(false);
mWebView.loadUrl("http://www.purelymean.com/app_pics");
}
}
But for some reason when I run it it opens the app, then opens the phones web browser as well?
Solution
you should add a WebViewClient to your WebView. The default one opens the Browser and this is what you are experiencing.
Answered By - yarons
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.