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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:25:50+00:00 2026-06-05T10:25:50+00:00

I have a simple WebView in my layout, with the following setup <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android

  • 0

I have a simple WebView in my layout, with the following setup

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/rootView"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/baserepeat"
    android:gravity="top|center_horizontal"
    android:orientation="vertical"
    android:paddingBottom="20dp"
    android:paddingLeft="20dp"
    android:paddingRight="20dp" >
 <WebView
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/productDetailContentWebview"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="top"
        android:background="@drawable/baserepeat" />
//other items...

Inside my manifest I have the containing activity set to

    <activity
        android:name=".Products.ProductDetailActivity"
        android:configChanges="keyboardHidden|orientation|screenSize"
        android:screenOrientation="sensor"
        android:theme="@style/Theme.CPS" >
    </activity>

My Webview is populated with a simple HTML file on the device, which works nicely. The problem is that when I rotate the device from portrait to landscale, the webview becomes a good deal taller, pushing whatever was below it further down in my layout. The amount of content doesn’t change – it is all set in OnCreate().

I’m using the Webview to render the content with it’s own special stylesheet, and it must stay within the ScrollView.

I can provide more information if required 🙂

  • 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-05T10:25:51+00:00Added an answer on June 5, 2026 at 10:25 am

    I had the similar issue when working on 2.3/4.0…

    I tried several things but the solution which helped me in getting rid of the core issue was:

    removing screenSize from android:configChanges in AndroidManifest.xml

    Hope it helps !!!

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

Sidebar

Related Questions

I have a very simple Activity with the following layout... <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent
I have the following simple code to display a pdf in a webview. I've
I have simple WebView code like this: WebView wv = (WebView) findViewById(R.id.webview1); wv.loadUrl(http://en.wikipedia.org/wiki/Book); But
I have a simple HTML5 form, opened in Android webview. But while filing the
I have written a simple WebView app and tested it on android 2.3. When
I have a very simple application and I cannot make the WebView to show
What i have here is a simple webview activity that when loaded it auto
I have a simple javaFX application that loads a webpage in a WebView componant.
I have written a simple helloworld app with a WebView which has a link
I have a webview and am trying to load simple UTF-8 text into it.

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.