Siva
Siva

Reputation: 355

Website not loading properly inside WebView Android

I'm trying to load this url http://www.uramus.com inside an Application with WebView. The problem is i'm getting just the background of the page (blue screen) with no elements of the Webpage loaded. While this never happens in Android default browser, which loads the page completely. Why does this happen?

Here's my code:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_home);
    ActionBar ab = getSupportActionBar();
    ab.hide();

    wb = (WebView) findViewById(R.id.wb);
    pg = (ProgressBar) findViewById(R.id.pg);

    wb.getSettings().setJavaScriptEnabled(true);     
    wb.getSettings().setLoadWithOverviewMode(true);
    wb.getSettings().setUseWideViewPort(true);        
    wb.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
    //wb.setWebViewClient(new MyClient());

    wb.loadUrl("http://www.uramus.com/#/new-releases");
}

Upvotes: 1

Views: 847

Answers (1)

vishal jangid
vishal jangid

Reputation: 3025

in your webview you are getting exception uncaught typeerror cannot read property

this is solved by this line of code.

webview.getSettings().setDomStorageEnabled(true);;

Upvotes: 3

Related Questions