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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:50:11+00:00 2026-05-18T10:50:11+00:00

I need to have a user form that is larger than the screen. The

  • 0

I need to have a user form that is larger than the screen. The layout consists of a fixed “title area”, the form (in a scrollview possibly) and a button on the bottom. I have created three layouts and the middle layout is a ScrollView with a vertically-oriented LinearLayout. Unfortunately, the form pushes the buttons off the screen?!

Is there a simple example to do this?

I suppose that I can use a ListView, but I would think my ScrollView is easier to manage. Here is my layout …

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

    <!-- Title Area on top -->
    <LinearLayout
    android:id="@+id/layout_form"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    >
    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
    >
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="0dip"
            android:layout_marginBottom="0dip"
            android:paddingTop="20dip"
            android:paddingBottom="20dip"
            android:paddingLeft="5dip"
            android:paddingRight="10dip"
            android:src="@drawable/logo"
            android:layout_gravity="center"
            android:layout_weight="1"
            />
        <TextView  
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            android:layout_gravity="center"
            android:layout_weight="2"
            android:layout_marginTop="0dip"
            android:layout_marginBottom="0dip"
            android:layout_marginLeft="4dip"
            android:layout_marginRight="4dip"
            android:text="@string/title_create"
            />
    </LinearLayout>

    <!-- Form entry on top -->

        <ScrollView 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:fillViewport="true"
            android:clipChildren="true"
            >
            <LinearLayout 
                android:orientation="vertical"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
            >
        <TextView  
            android:layout_width="fill_parent" 
            android:layout_height="wrap_content" 
            android:layout_gravity="center_horizontal"
            android:layout_marginLeft="8dip"
            android:layout_marginRight="8dip"
            android:text="@string/label_field_one"
            />
        <EditText
            android:id="@+id/edit_field_one"
            android:layout_width="fill_parent" 
            android:layout_height="wrap_content" 
            android:singleLine="true"
            android:layout_marginLeft="10dip"
            android:layout_marginRight="10dip"
            android:hint="@string/hint_field_one"
            />
        <TextView  
            android:layout_width="fill_parent" 
            android:layout_height="wrap_content" 
            android:layout_gravity="center_horizontal"
            android:layout_marginLeft="8dip"
            android:layout_marginRight="8dip"
            android:text="@string/label_field_two"
            />
        <EditText
            android:id="@+id/edit_field_two"
            android:layout_width="fill_parent" 
            android:layout_height="wrap_content" 
            android:singleLine="true"
            android:layout_marginLeft="10dip"
            android:layout_marginRight="10dip"
            android:hint="@string/hint_field_two"
            />

            <!-- Repeat label-text and edit-text until done ... -->

            </LinearLayout>
            </ScrollView>


    <!-- "spring" between form and wizard buttons. -->
    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
    />

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="left"
        android:layout_weight="2"
        >
        <Button
            android:id="@+id/btn_submit"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="right"
            android:layout_weight="1"
            android:text="@string/button_submit"
        />
    </LinearLayout>
        </LinearLayout>


</LinearLayout>
  • 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-18T10:50:12+00:00Added an answer on May 18, 2026 at 10:50 am

    If I understand correctly, this is something that’s brought up pretty commonly – having a fixed header and footer, and fill the middle with whatever (in your case, a ScrollView). Is that what you’re looking for? If so, you’ll want to try something like below:

    <RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        >
        <LinearLayout
            android:id="@+id/header"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            >
            //.....stuff here
        </LinearLayout>
        <LinearLayout
            android:id="@+id/footer"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            >
            //.....stuff here
        </LinearLayout>
        <ScrollView
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_above="@id/footer"
            android:layout_below="@id/header"
            >
            //......stuff here
        </ScrollView>
    </RelativeLayout>
    

    Basically, you define a header, give it a fixed height (wrap_content in this case), and set it to align to the top of the parent (the RelativeLayout). Then, do the same for the footer, aligning it to the bottom of the parent. You could substitute just a Button for the LinearLayout for the footer, for your situation, or you can just place the button inside the LinearLayout. It’s probably slightly faster to inflate the layout without the extra LinearLayout. But anyway, next, define your form, the scrolling area. Set the height to fill_parent, and tell it to be above the footer, and below the header. This will cause it to take up all the remaining space between the header and footer.

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

Sidebar

Related Questions

I have a requirement wherein I need to display on a User form, a
I have a user form where users can post comment on articles. i need
I have a very large 60+ question form that the user can start to
Ok I have a user form that has values submitted to the database. My
I have user-submitted text via form that could have multiple blocks of text in
I have a form that needs to be dynamic, allowing the user to add
I have a large form that consists of all the input (text, checkbox, radio,
I have a very large Form with many date fields that need to be
I need to know which views does a user have which privileges on. I'm
i have a large user Database (13k+), and for some reason i need to

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.