Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8517315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:39:50+00:00 2026-06-11T05:39:50+00:00

I have absolutely no idea if this is the right way to do it,

  • 0

I have absolutely no idea if this is the right way to do it, but i am displaying a splashscreen as long as the webview is loading, when the webview is done loading, i display the webview.

But the HTML content of the webview is not being rendered correctly. Its displaying the content correctly in the built-in browser on my Android phone, and on every other device i have.
So the problem is confined to this app.

MainActivity.java

package dk.zerone.vuc;

import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Color;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends Activity {

public final boolean networkCheck() {
    ConnectivityManager connec =  (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);

    if ( connec.getNetworkInfo(0).getState() == NetworkInfo.State.CONNECTED ||
    connec.getNetworkInfo(0).getState() == NetworkInfo.State.CONNECTING ||
    connec.getNetworkInfo(1).getState() == NetworkInfo.State.CONNECTING ||
    connec.getNetworkInfo(1).getState() == NetworkInfo.State.CONNECTED ) {
        return true;
    } else if (connec.getNetworkInfo(0).getState() == NetworkInfo.State.DISCONNECTED || connec.getNetworkInfo(1).getState() == NetworkInfo.State.DISCONNECTED  ) {
        return false;
    }
    return false;
}

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    /* Splash screen */
    setContentView(R.layout.splash);

    if(networkCheck()) {

        String url = "http://mobil.vucfyn.dk/mobil";

        final WebView webview;
        webview = new WebView(MainActivity.this);
        webview.loadUrl(url);

        webview.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                //view.loadUrl(url);
                return false;
            } 

            @Override
            public void onPageFinished(WebView view, String url) { 
                super.onPageFinished(view, url); 
                setContentView(webview);

             } 
        });

    } else {
        AlertDialog alertDialog = new AlertDialog.Builder(MainActivity.this).create();
        alertDialog.setTitle("Fejl");
        alertDialog.setMessage("Ingen forbindelse til internettet");

        alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {

            }
        });
        alertDialog.show();
    }
  }

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.activity_main, menu);
    return true;
    } 
}

LogCat output:

08-29 09:29:56.572: D/dalvikvm(545): GC_FOR_ALLOC freed 66K, 3% free 10191K/10503K, paused 58ms
08-29 09:29:56.579: I/dalvikvm-heap(545): Grow heap (frag case) to 11.036MB for 1048592-byte allocation
08-29 09:29:56.640: D/dalvikvm(545): GC_CONCURRENT freed 1K, 4% free 11214K/11591K, paused 4ms+4ms
08-29 09:29:56.849: I/WebView(545): webview.loadUrl(url)
08-29 09:29:57.139: D/gralloc_goldfish(545): Emulator without GPU emulation detected.
08-29 09:29:57.849: E/chromium(545): external/chromium/net/disk_cache/backend_impl.cc:1097: [0829/092957:ERROR:backend_impl.cc(1097)] Critical error found -8
08-29 09:29:58.029: W/chromium(545): external/chromium/net/disk_cache/storage_block-inl.h:119: [0829/092958:WARNING:storage_block-inl.h(119)] Failed data load.
08-29 09:29:58.029: W/chromium(545): external/chromium/net/disk_cache/storage_block-inl.h:119: [0829/092958:WARNING:storage_block-inl.h(119)] Failed data load.
08-29 09:29:58.039: W/chromium(545): external/chromium/net/disk_cache/storage_block-inl.h:119: [0829/092958:WARNING:storage_block-inl.h(119)] Failed data load.
08-29 09:29:58.059: E/chromium(545): external/chromium/net/disk_cache/entry_impl.cc:830: [0829/092958:ERROR:entry_impl.cc(830)] Failed to save user data
08-29 09:30:00.349: E/libEGL(545): call to OpenGL ES API with no current context (logged once per thread)
08-29 09:30:00.360: D/ShaderProgram(545): couldn't load the vertex shader!
08-29 09:30:00.360: E/libEGL(545): call to OpenGL ES API with no current context (logged once per thread)
08-29 09:30:00.360: D/ShaderProgram(545): couldn't load the vertex shader!
08-29 09:30:00.360: E/libEGL(545): call to OpenGL ES API with no current context (logged once per thread)
08-29 09:30:00.360: D/ShaderProgram(545): couldn't load the vertex shader!
08-29 09:30:00.360: E/libEGL(545): call to OpenGL ES API with no current context (logged once per thread)
08-29 09:30:00.360: D/ShaderProgram(545): couldn't load the vertex shader!
08-29 09:30:00.360: E/libEGL(545): call to OpenGL ES API with no current context (logged once per thread)
08-29 09:30:00.360: D/ShaderProgram(545): couldn't load the vertex shader!
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T05:39:52+00:00Added an answer on June 11, 2026 at 5:39 am

    If the website has javascript you are missing this line:

    webView.getSettings().setJavaScriptEnabled(true);
    

    And if your target is higher than 2.3.3 try adding this in your manifest file.

    android:hardwareAccelerated="true"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have absolutely no idea why this is happening but the following code seems
Right, this is weird, I have no idea why this is happening, but what
I have absolutely no idea how to do this, so I'm just gonna go
I have absolutely no idea what I'm doing wrong right now. I think I'm
I have absolutely no idea where this memory leak is from. None of the
I have absolutely no access to a machine with IE on it right now
I have read the documentation on this, and still i have no idea how
http://jsfiddle.net/Lqvcr/53/ This is so damn basic and I have no idea how to make
I have this demo However the mouse over when dragged to left or right
I have absolutly no idea how to unpack the created archive. I give you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.