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

  • Home
  • SEARCH
  • 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 8084953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:57:06+00:00 2026-06-05T17:57:06+00:00

I have a WebView at the bottom of view in ViewPager … When I

  • 0

I have a WebView at the bottom of view in ViewPager… When I slide through the items of ViewPager. The View moves on down. (I guess the focus goes to webview)
I am not sure whether this is due to WebView.
Loading the webview with html data using
webView.loadDataWithBaseURL(null, data, "text/html","utf-8",null);

It’s annoying when the page moves down every time the next item is loaded. I have an ImageView at the top of the View

Any pointers?

here is the xml:

<ScrollView
        android:id="@+id/scroll_view_1"
        style="@style/some_style"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:fadingEdge="none" >

        <LinearLayout
            android:id="@+id/linear_layout_1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/some_drawable"
            android:orientation="vertical" >

            <RelativeLayout
                android:id="@+id/relative_layout_1"
                android:layout_width="fill_parent"
                android:layout_height="250dp"
                android:paddingLeft="5dip"
                android:paddingRight="5dip" >

                <LinearLayout
                    android:id="@+id/linear_layout_2"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_alignParentBottom="true"
                    android:layout_marginTop="5dip"
                    android:gravity="center" >

                    <PageIndicator
                        android:id="@+id/page_indicator"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:padding="10dip" />
                </LinearLayout>

                <RelativeLayout
                    android:id="@+id/relative_layout_2"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:layout_alignParentTop="true"
                    android:visibility="visible" >

                    <TextView
                        android:id="@+id/text_view_1"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentRight="true"
                        android:layout_centerVertical="true"
                        android:layout_marginRight="10dip"
                        android:text="1/50"
                        android:textColor="#000000"
                        android:textSize="16sp" />

                    <ImageView
                        android:id="@+id/image_view_1"
                        android:layout_width="35dip"
                        android:layout_height="35dip"
                        android:layout_marginRight="5dip"
                        android:layout_toLeftOf="@id/text_view_1"
                        android:scaleType="centerInside"
                        android:src="@drawable/some_drawable_3" />

                    <ImageView
                        android:id="@+id/image_view_2"
                        android:layout_width="35dip"
                        android:layout_height="35dip"
                        android:layout_marginRight="5dip"
                        android:layout_toLeftOf="@id/image_view_1"
                        android:scaleType="centerInside"
                        android:src="@drawable/some_drawable_4" />
                </RelativeLayout>
            </RelativeLayout>

            <RelativeLayout
                android:layout_width="relative_layout_3"
                android:layout_height="wrap_content"
                android:background="#f8f8f8"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                android:paddingBottom="5dip"
                android:paddingTop="5dip" >

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerInParent="true"
                    android:gravity="center_vertical" >

                    <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:scaleType="centerInside"
                        android:src="@drawable/some_drawbale_2" />

                    <TextView
                        android:id="@+id/text_view_2"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_marginLeft="6dip"
                        android:gravity="left|center_vertical"
                        android:paddingLeft="3dip"
                        android:paddingRight="7dip"
                        android:text="$121.00"
                        android:textColor="#000000"
                        android:textSize="16sp"
                        android:textStyle="bold" />

                    <Button
                        android:id="@+id/button_1"
                        android:layout_width="95dip"
                        android:layout_height="30dip"
                        android:layout_gravity="center_vertical"
                        android:layout_marginLeft="15sp"
                        android:background="@drawable/some_drawable_5"
                        android:gravity="center"
                        android:textSize="15dip" />
                </LinearLayout>
            </RelativeLayout>

            <TextView
                android:id="@+id/text_view_3"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dip"
                android:layout_marginRight="10dip"
                android:layout_marginTop="10dip"
                android:gravity="left"
                android:lineSpacingExtra="2dip"
                android:text="Some Text"
                android:textColor="#000000"
                android:textSize="16sp"
                android:textStyle="bold" />

            <LinearLayout
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingBottom="10dip"
                android:paddingTop="15dip" >

                <WebView
                    android:id="@+id/web_view"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dip"
                    android:layout_marginRight="10dip"
                    android:focusable="false"/>
            </LinearLayout>
        </LinearLayout>
    </ScrollView>
  • 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-05T17:57:08+00:00Added an answer on June 5, 2026 at 5:57 pm

    I had the same kind of issue. And adding this attribute to the top most linear layout solved the issue. try this,

      android:descendantFocusability="blocksDescendants". 
    

    In your case add this to your Linear Layout inside the ScrollView and check.

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

Sidebar

Related Questions

I have a webview which shows lines when scrolling up and down. I load
I have a toolbar aligned at the bottom and a WebView above it, which
I have a webview and an admob ad onthe bottom. It is getting the
I have a subview that loads via [super viewWillAppear: animated]; [self.view addSubview: self.webView ];
I have a WebView and a layout at the bottom housing the back and
I have a webview which will load from file or from the web. I
I have a webview which I would like to remove the elasticity from. As
I have an webView in a Cocoa application which I edit the contents programatically.
I have a webview and I want to manually switch to another tab during
I have a WebView. I'd like to show some page from my server, but

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.