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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:10:38+00:00 2026-05-25T20:10:38+00:00

I would like to have a screen where most of it is a ScrollView

  • 0

I would like to have a screen where most of it is a ScrollView occupying 80% of the screen, and the lower 20% is an image. Within the ScrollView, I’d like to be able to stack a long text over buttons at the end of it. (Think of it as a survey application.)

I am unable to get the layout to properly position the Scrollview and image. When I use wrap_content or fill_parent, the ScrollView, which contains text much longer than the screen, always pushes the image out of the screen.

How can I properly force the image to stay on the screen and limit the ScrollView’s size?

  • 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-25T20:10:38+00:00Added an answer on May 25, 2026 at 8:10 pm

    In order to get 2 or more views laid out in an arbitrarily proportional way, you must use LinearLayout’s “weight” functionality. You do this be applying the layout_weight attribute to the child views in the LinearLayout. The layout_weight attribute distributes any left-over space to its children in a proportional manner, based on their relative weights.

    In this case, the “left-over space” can be defined as the amount of space in the LinearLayout that would be left-over, in the absence of any layout_weight attributes on any of its children.

    So, in order for the size of the views to be determined in a way that is completely proportional to the size of their parent (and thus to each other as well), you must also set their height (or width, for a horizontal LinearLayout) to 0. In this case, the left-over space is in fact the entire height (width) of the LinearLayout, which is then divvied up proportionally among the children based on their relative weights.

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

Sidebar

Related Questions

I would like to have a scrollable image gallery that takes up most of
I have this issue when I would like to go the Game Over screen.
I would like my screen to have a listview with a header. In my
I have a splash screen that I would like to fade in, while my
I have a view which I would like to fill up the entire screen
I have a video view that is full screen and would like to trigger
I have five activities/screens that I would like to be able to swipe between,
I would like to have an AppWidget that designed like this one . Image:
I would like most of my text boxes in my web application to display
So in my project i would like have a nice treeview that has images.

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.