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 8851273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:06:54+00:00 2026-06-14T13:06:54+00:00

As far as im aware, the WebView is the same thing as the built

  • 0

As far as im aware, the WebView is the same thing as the built in browser? Right?

I am facing an issue where a page that contains some absolute positioned div elements all stack on top of eachother instead of finding their correct location, AND background-image gets completely ignored.

This said, in the browser on my phone (HTC Incredible S – 2.3.3, stock browser) renders it out correctly, and on top of this, applications that use an embedded webview that i can point it to the page, renders correctly. Which leads me to beleive that the webview I have in my application is bjorking somehow.

import android.app.Activity;
import android.content.Intent;
import android.graphics.Rect;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebSettings.LayoutAlgorithm;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.Toast;

import java.util.*;

public class ShowWebView extends Activity {

    public WebView web;
    public String baseURL = "http://test.dev/";

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.webpage);

        web = (WebView) findViewById(R.id.webpage);
        home = (Button) findViewById(R.id.tool_Home);
        back = (ImageButton) findViewById(R.id.tool_Back);
        forward = (ImageButton) findViewById(R.id.tool_Forward);
        refresh = (ImageButton) findViewById(R.id.tool_Refresh);

        ajax = (ImageView) findViewById(R.id.test_anim);
        ajax.setBackgroundResource(R.drawable.ajax_animation);


        // Settings
        web.getSettings().setJavaScriptEnabled(true);
        web.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
        web.setWebViewClient(new WebViewClient());

        Bundle extras = getIntent().getExtras();
        if(extras != null) {

            String url = baseURL+extras.getString("page")+"?androidApplication"; // The Basics, page gets added to baseURL
            String id = "";
            String push = "false"; // false by default

            // If an ID exists, lets get it
            if(extras.getString("id") != null) {
                id = extras.getString("id");
            }

            if(extras.getString("push") != null) {
                push = extras.getString("push");
            }

            // Build the URL
            if(id != "") url = url + "&id="+id;
            if(push != "false")     url = url + "&pushVersion";

            web.loadUrl(url);
        } else {
            web.loadUrl("http://www.bing.com");
        }
}

also heres my webview xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    style="@style/MainPage"
    android:orientation="vertical" >

    <LinearLayout
        android:id="@+id/Header"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical" >


        <ImageView
            android:id="@+id/ImageView01"
            android:layout_width="match_parent"
            android:layout_height="42sp"
            android:scaleType="fitXY"
            android:src="@drawable/top_header" />

    </LinearLayout>
    <LinearLayout
        android:id="@+id/SubHeader"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical" >


        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="match_parent"
            android:layout_height="28sp"
            android:scaleType="fitXY"
            android:src="@drawable/top_sub_header" />

    </LinearLayout>

    <LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" >








        <LinearLayout
            android:id="@+id/linearLayout2"
            android:layout_width="match_parent"
            android:layout_height="0dip"
            android:layout_weight="1"
            android:orientation="vertical" >

            <WebView
                xmlns:android="http://schemas.android.com/apk/res/android"
                android:id="@+id/webpage"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                 />

        </LinearLayout>




        <LinearLayout
            android:id="@+id/toolBar"
            android:layout_width="match_parent"
            android:layout_height="40sp"
            android:layout_marginTop="2.5sp"
            android:orientation="horizontal" >

            <Button
                android:id="@+id/tool_Home"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Home" />


            <ImageButton
                android:id="@+id/tool_Back"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/backward" />


            <ImageButton
                android:id="@+id/tool_Forward"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/forward" />


            <ImageButton
                android:id="@+id/tool_Refresh"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/refresh" />


            <ImageView
                android:id="@+id/test_anim"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:layout_centerHorizontal="true" />

        </LinearLayout>

    </LinearLayout>

</LinearLayout>

any help resolving this issue would be truly amazing!

  • 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-14T13:06:55+00:00Added an answer on June 14, 2026 at 1:06 pm

    Apparently:

    web.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
    

    was causing the webview to freak out, as it reorganizes the html renderer to place everything in a single column (or try to anyways). Disabling this line or using NORMAL causes the render to be just fine.

    I was only using this line to disable horizontal scrolling. So now i have THAT issue to deal with again and still.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm aware of os.listdir , but as far as I can gather, that gets
First off: I am aware that there have been some vaguely similar requests on
This isn't a big issue for me (as far as I'm aware), it's more
First of all I'm aware that my question is same as in here .
As far as I'm aware, plain html or javascript won't allow me to upload
So far I know that FileSystemWatcher can look into a folder and if any
As far as I am aware, IE9 should have CSS support for rounded corners.
The advantages of DI, as far as I am aware, are: Reduced Dependencies More
I'm aware that similar questions on SO are numerous, but I have a caveat.
As far as I am aware(correct me if I'm wrong), Linux is storing the

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.