samedi 5 décembre 2015

How to show webpage really in-app in webview?

I have this problem. I want to show webpage in my application. I pass link from another activity and then i want to show it in webview. But it still ask me to show it in default web browser or Chrome. But i want to have webpage in app without external browser. This is my code:

 @Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_quiz);


    Intent intentObject = getIntent();
    WebView v = (WebView)findViewById(R.id.webView);
    v.loadUrl(intentObject.getStringExtra("link"));
}

Please help me, thank for all advices.




Aucun commentaire:

Enregistrer un commentaire