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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:07:59+00:00 2026-05-16T08:07:59+00:00

I previously asked a question that I still have not been able to solve:

  • 0

I previously asked a question that I still have not been able to solve:

http://stackoverflow.com/questions/3126347/android-relativelayout-how-to-alignparentbottom-when-wrapped-in-a-scrollview

What I am trying to do is align a view to the bottom of the screen, using either a RelativeLayout or LinearLayout, and then wrap that layout in a scrollview to permit scrolling when necessary (for changes to landscape orientation or on small screen devices).

To date, what I find is that anything aligned to parent bottom works great as long at the bottom is visible…but if the bottom is below the scroll, the view that is aligned parent bottom jumps up to the top.

This seems like a very common design for ads that appear on the bottom, so I would think that this is possible. Is it?

  • 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-16T08:08:00+00:00Added an answer on May 16, 2026 at 8:08 am

    I don’t know if there is ONE method to do that, but here is a trick I use to do this kind of stuff. If this is what you want :
    alt text http://img594.imageshack.us/img594/3419/scrollviewandads.png
    Here is my code for it :

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    android:id="@+id/scrollAds">
    <ScrollView android:id="@+id/scrollView"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:layout_marginBottom="50dip">
        <TextView android:id="@+id/tvInScroll" android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae metus ac leo ultrices placerat. Curabitur vel ipsum vitae urna ultricies rhoncus. Proin tempus felis nec turpis feugiat vitae vestibulum arcu faucibus. Donec dapibus mi at nisl mattis a malesuada lectus feugiat. Etiam ultricies adipiscing nisi, sed scelerisque mauris ultricies sagittis. Proin blandit dignissim magna, id consectetur justo molestie in. Nullam id nunc et sem dictum malesuada ac et libero. Integer vitae mattis est. Nulla sodales dolor nec metus tempor a vestibulum nisl pellentesque. Suspendisse interdum, risus non pulvinar aliquet, tellus elit sodales ligula, vitae mollis nisi massa eget purus. Etiam pharetra consectetur ipsum, eu pretium est egestas eu. Vivamus varius tortor ac leo gravida tempus. Ut semper scelerisque vestibulum. Morbi pretium neque vel neque tempus tempus. Proin tellus tortor, posuere nec dignissim in, venenatis hendrerit augue. Etiam eget justo a nisl semper lobortis. Etiam cursus sodales ipsum non sagittis. Vivamus non metus augue, vehicula iaculis tortor. Aenean tristique orci id lorem consequat vitae commodo metus auctor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae metus ac leo ultrices placerat. Curabitur vel ipsum vitae urna ultricies rhoncus. Proin tempus felis nec turpis feugiat vitae vestibulum arcu faucibus. Donec dapibus mi at nisl mattis a malesuada lectus feugiat. Etiam ultricies adipiscing nisi, sed scelerisque mauris ultricies sagittis. Proin blandit dignissim magna, id consectetur justo molestie in. Nullam id nunc et sem dictum malesuada ac et libero. Integer vitae mattis est. Nulla sodales dolor nec metus tempor a vestibulum nisl pellentesque. Suspendisse interdum, risus non pulvinar aliquet, tellus elit sodales ligula, vitae mollis nisi massa eget purus. Etiam pharetra consectetur ipsum, eu pretium est egestas eu. Vivamus varius tortor ac leo gravida tempus. Ut semper scelerisque vestibulum. Morbi pretium neque vel neque tempus tempus. Proin tellus tortor, posuere nec dignissim in, venenatis hendrerit augue. Etiam eget justo a nisl semper lobortis. Etiam cursus sodales ipsum non sagittis. Vivamus non metus augue, vehicula iaculis tortor. Aenean tristique orci id lorem consequat vitae commodo metus auctor. "></TextView>
    </ScrollView>
    
    <TextView android:layout_width="wrap_content" android:id="@+id/tvBelowScroll"
        android:text="This is your ads TV" android:layout_height="50dip"
        android:textStyle="bold" android:textSize="18dip"
        android:layout_alignParentBottom="true"></TextView>
    </RelativeLayout>
    

    I hope this matches your hopes 😉 It just a trick with margins.

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

Sidebar

Related Questions

I asked a similar question about this previously, but I did not specify that
Ok, i've read most relevant questions asked here previously on this but I still
Refering to a previously asked question , I would like to know how to
This question builds off of a previously asked question: Pass by reference multidimensional array
I previously asked a question regarding MX records (and appreciate the thoughtful answers I
This is in reference to the question previously asked The problem here is, each
Previously, I asked the question . The problem is the demands of our file
this question is an extension to a previous question i asked (and was answered).
I'm quoting myself on a previous question I asked to further explain: I'm trying
In a previous question, I asked about various ORM libraries. It turns out Kohana

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.