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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:14:42+00:00 2026-05-22T02:14:42+00:00

I have an Activity that consists of a large scrollview (that contains EditText fields)

  • 0

I have an Activity that consists of a large scrollview (that contains EditText fields) along with a button that is anchored to the bottom of the screen (not part of the scrollView). This is a simple example to display the issue I am seeing. The manifest for my app specifies android:windowSoftInputMode = adjustPan for all Activities.

If I run this Activity directly, everything is displayed correctly and the scrollview scrolls between the edit fields as it should.

I don’t have enough points to post images or >2 hyperlinks…..

No TabHost – edit first field

If I run this Activity as the content of a TabHost, the scrolling seems to be borked. Whenever an EditText gains focus, the activity properly pans to the Edit field. However, it also forces the button onto the screen.

Inside TabHost – edit first field – Where did that button come from

I have tried creating the layout for this Activity using a LinearLayout (with negative margin for the button) as well as a RelativeLayout, and both exhibit the same issue with the button always being visible when scrolling through the 3 EditText fields.

Has anyone seen anything like this before or have any idea how to get the scrolling to work properly inside the TabHost ?????

LinearLayout version

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<ScrollView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_marginBottom="60dip"
    >
    <LinearLayout 
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        >       
        <EditText android:id="@+id/e1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="30dip"
            android:layout_marginBottom="30dip"
            android:hint="edit text 1"
            />
        <EditText android:id="@+id/e2"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="30dip"
            android:layout_marginBottom="30dip"
            android:hint="edit text 2"
            />
        <EditText android:id="@+id/e3"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="30dip"
            android:layout_marginBottom="30dip"
            android:hint="edit text 3"
            />
    </LinearLayout>
</ScrollView>
<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Button"
    android:layout_marginTop="-60dip"
    android:layout_gravity="center"
    />

RelativeLayout Version

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button android:id="@+id/button1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Button"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true"
    />
<ScrollView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_alignParentTop="true"
    android:layout_above="@+id/button1"
    >
    <LinearLayout 
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        >       
        <EditText android:id="@+id/e1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="30dip"
            android:layout_marginBottom="30dip"
            android:hint="edit text 1"
            />
        <EditText android:id="@+id/e2"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="30dip"
            android:layout_marginBottom="30dip"
            android:hint="edit text 2"
            />
        <EditText android:id="@+id/e3"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="30dip"
            android:layout_marginBottom="30dip"
            android:hint="edit text 3"
            />
    </LinearLayout>
</ScrollView>

Thanks in advance.

  • 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-05-22T02:14:43+00:00Added an answer on May 22, 2026 at 2:14 am

    In case this helps someone else…..

    All the Activities that were hosted inside the TabHost had android:windowSoftInputMode = adjustPan.

    However, the Activity that hosted the TabHost was missing android:windowSoftInputMode = adjustPan.
    Once I added that, the panning worked the smae inside a TabHost or outside the TabHost.

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

Sidebar

Related Questions

I have an activity that has a TabHost containing a set of TabSpecs each
i have created a workflow activity that do give the item creater of a
I have a web-based application that notifies users of activity on the site via
I have an activity which consists of a GridView with multiple (different) images. When
I have activity that load's image from server into imageview. Image is displayed after
I have an Activity that plays some audio from within a ListActivity . The
I have an activity that has the following set as theme: android:theme=@android:style/Theme.Dialog However, there
I have an activity that runs a query on a Sqlite DB, gets a
I have a need to do auditing all database activity regardless of whether it
I have a couple of tables which are used to log user activity for

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.