3 Replies - 335 Views - Last Post: 11 August 2013 - 10:09 PM

#1 istore221  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 136
  • Joined: 11-December 11

Navigate whole mobile website in webView

Posted 03 August 2013 - 09:51 AM

Click here to see mobile site

I'm creating a simple application to navigate this website via a android application.i have created a webview inside my app and loaded home page into webview .its working fine.but when i click a button it opens up my real web browser in my phone intend of displaying inside the webview.how do i load whole web site inside my webview.

my code so fat

 WebView myWebView = (WebView) findViewById(R.id.webview);
        myWebView.loadUrl("http://m.ikman.lk/");
    
        WebSettings webSettings = myWebView.getSettings();
        webSettings.setJavascriptEnabled(true);


Is This A Good Question/Topic? 0
  • +

Replies To: Navigate whole mobile website in webView

#2 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 851
  • View blog
  • Posts: 2,598
  • Joined: 29-July 11

Re: Navigate whole mobile website in webView

Posted 03 August 2013 - 12:30 PM

It's an Intent issue. You have to tell the webView that is should use a webClient to navigate pages, otherwise the Intent system will handle it for you via whatever browser handles urls by default.

webView.setWebViewClient(new WebViewClient());


Was This Post Helpful? 1
  • +
  • -

#3 istore221  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 136
  • Joined: 11-December 11

Re: Navigate whole mobile website in webView

Posted 03 August 2013 - 07:42 PM

View Postfarrell2k, on 03 August 2013 - 12:30 PM, said:

It's an Intent issue. You have to tell the webView that is should use a webClient to navigate pages, otherwise the Intent system will handle it for you via whatever browser handles urls by default.

webView.setWebViewClient(new WebViewClient());



Thanks Sir it worked.
Was This Post Helpful? 0
  • +
  • -

#4 LawlessBaron  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 115
  • Joined: 07-February 13

Re: Navigate whole mobile website in webView

Posted 11 August 2013 - 10:09 PM

Thanks farrell i was looking for a solution on this each time i open a forum it would open in a web browser hopefully this works for me i will post back with details
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1