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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:57:10+00:00 2026-05-26T07:57:10+00:00

I want to put a scrollable EditText above a row of buttons such that

  • 0

I want to put a scrollable EditText above a row of buttons such that the text component fills all the vertical space left free by the buttons. This is proving surprisingly difficult, not least because the ADT is buggy: it suggests that this layout will do and it does in Eclipse but not in the real application!

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <EditText android:id="@android:id/text1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@+id/view1"/>
    <LinearLayout android:id="@id/view1"
        android:orientation="horizontal"
        android:layout_alignParentBottom="true">
        <!-- buttons go here -->
    </LinearLayout>
</RelativeLayout>

In this layout the text stretches to the full screen, as you might expect, i.e., it goes under the button but the ADT graphical layout tool shows it stopping just above the button. OTOH if you give it a wrap_content height then of course it doesn’t stretch. layout_weight is of no help either.

So, is there a way? You must test your answer in the emulator or on a real device, not merely in Eclipse.


Precision: what makes me think this is not working and that the text widget extends under the buttons is the shape of the scrollbar at the bottom (see pic. below): it should be rounded at both ends and instead it looks like the bottom extends farther. If you compares its shape at the bottom with the shape it has at the top (which unfortunately I was unable to capture: it disappears too fast) it is very clearly different. OTOH the text widget boundary looks as expected. This is very confusing. Maybe just a minor bug in Android?

enter image description here

  • 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-26T07:57:11+00:00Added an answer on May 26, 2026 at 7:57 am

    try this code :

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    
        <EditText
            android:id="@+id/editText1"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:inputType="textMultiLine" >
    
            <requestFocus></requestFocus>
        </EditText>
        <LinearLayout
            android:layout_height="wrap_content"
            android:id="@+id/linearLayout1"
            android:layout_width="match_parent">
            <Button
                android:text="Button"
                android:layout_weight="1"
                android:layout_height="wrap_content"
                android:id="@+id/button1"
                android:layout_width="0dp"></Button>
            <Button
                android:text="Button"
                android:layout_weight="1"
                android:layout_height="wrap_content"
                android:id="@+id/button2"
                android:layout_width="0dp"></Button>
            <Button
                android:text="Button"
                android:layout_weight="1"
                android:layout_height="wrap_content"
                android:id="@+id/button3"
                android:layout_width="0dp"></Button>
        </LinearLayout>
    </LinearLayout>
    

    enter image description here

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

Sidebar

Related Questions

I want to put all my resources into a ClientBundle for easy management. So
I want to put a small icon in my text input placeholder right where
I want to put a scrollable box inside of a fieldset , but I’ve
I'm writing a vertical scrollable calendar application(listview) that is always showing 1 month at
I want put all configuration data from WPF projects to one file for whole
I've got a value type that I want put into a map. It has
I want to use core text to draw string that can span over 100
I want to put only text in tab bar, no image... I want to
I have a page layout for my MOSS '07 site that I want put
I want to put UIbutton at bottom which should be displayed on my all

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.