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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:20:34+00:00 2026-05-13T10:20:34+00:00

I have had a number of problems with ScrollViews. Recently I tried to create

  • 0

I have had a number of problems with ScrollViews. Recently I tried to create a LinearView which content exceeds the screen size so I created the new layout with parent element ScrollView and set its width and height to custom values (the layout has to appear as dialog – not filling the whole screen).

When the element is selected the red border appears to embrace the rectangle of predefined ScrollView LayoutWidth and LayoutHeight which is OK. Then I placed inside the LinearView and set the values LayoutWidth and LayoutHeight to fill_parent.

Then when I started to add the elements into the LinearLayout the border (red lile) wrapped the inserted elements, not the whole parent ScrollView.

So when the content of the LinearLayout (child of ScrollView) exceeded the size of parent ScrollView the scroll didn’t appear and the bottom elements are simply invisible.

Anyway.. in that case the XML content was too extensive to post the question here and now I’m having the same problem with the more simple example.

The following part of the layout is intended to be a scrollable EditText (in case the user input exceeds the primary size of the widget). I wanted to set the EditText height to 120px, so I set the parent ScrollView height to 120px and the child EditText to fill_parent. Again in this case the EditText doesn’t fill the whole ScrollView area but a single line:

 <ScrollView android:layout_height="120px" android:layout_width="fill_parent">
<EditText android:id="@+id/txtContent" android:layout_height="fill_parent" android:layout_width="fill_parent" android:text="TestContent">
</EditText>
</ScrollView>

Does anyone know how to reshape the content above so the EditText fills the parent control and in case the user’s input exceeds the control size the scroll appears?

Thank you!

Edit:

Below are the screenshots of the layout

removed dead ImageShack link
removed dead ImageShack link

  • 1 1 Answer
  • 2 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-13T10:20:34+00:00Added an answer on May 13, 2026 at 10:20 am

    Your EditText should have a height of wrap_content. fill_parent has no meaning in a ScrollView. If you want the EditText to fill your ScrollView when it’s content is smaller than the ScrollView, use android:fillViewport="true" on the ScrollView.

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

Sidebar

Related Questions

I'm very much a vb person, but have had to use this id number
I have had Delphi 2007 for a while. I tried the Delphi 2009 trial.
I have had a few problems getting this right, so I wanted to ask
I have successfully created a number of UserControls with various functionality setting the DataContext
I’ve got a problem and it seems some before me have had similar problems
I see a number of posts on the various problems folks have with troubleshooting
There are two problems I ran into last night which I have resolved now,
I have had an online archive service for over a year now. Unfortunately, I
I have had to compile my app for the 4.0 sdk to run on
I have had a persistent problem with Visual Studio 2010 and any framework version

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.