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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:35:55+00:00 2026-06-18T08:35:55+00:00

I am working on android project and I am having a problem getting an

  • 0

I am working on android project and I am having a problem getting an advert to be shown at the bottom of the screen underneath a listview without causing any overlapping.

At the moment, if there is a large number of items within the list view causing scrolling, an advert is supposed to show underneath the list view but at the moment the advert is sitting on top of the list view, therefore, the user can’t see what’s at the bottom of the list view.

Below is the copy of my XML layout

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
    android:layout_width="match_parent"
    android:layout_height="fill_parent"
    android:background="@color/black"
    android:orientation="vertical" >
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">
    <TextView android:id="@+id/password_noRecords"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:layout_gravity="center"
        android:text="There are currently\nno saved logins"
        android:textSize="20dp"
        android:textStyle="bold|italic"/>
    <ListView 
        android:id="@android:id/list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
    </ListView>
    <Button android:id="@+id/password_clearSearch" 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/password_clear_search"
        android:layout_alignParentBottom="true"
        android:visibility="gone"/>
    </LinearLayout>
    <com.google.ads.AdView android:id="@+id/adView"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:layout_alignParentBottom="true"
        android:gravity="center_horizontal"
        ads:adUnitId="a14d6125d95c70b"
        ads:adSize="BANNER"
        ads:testDevices="TEST_EMULATOR, 015d1884222bfe01"/>
</RelativeLayout>

I’ve many different ways, having it all inside the relative layout instead of having another linear layout, not having align parent bottom = true but then it sits at the top of the list view overlapping whatever is at the top of the list view.

Thanks for any help you can provide.

  • 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-06-18T08:35:57+00:00Added an answer on June 18, 2026 at 8:35 am

    You can fix this by using only a LinearLayout as the base (get rid of the RelativeLayout) and using the android:layout_weight property on your ListView. Example:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
        <TextView android:id="@+id/password_noRecords"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:layout_gravity="center"
            android:text="There are currently\nno saved logins"
            android:textSize="20dp"
            android:textStyle="bold|italic"/>
        <ListView 
            android:id="@android:id/list"
            android:layout_width="fill_parent"
            android:layout_height="0dp"
            android:layout_weight="1" />
        <Button android:id="@+id/password_clearSearch" 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="@string/password_clear_search"
            android:layout_alignParentBottom="true"
            android:visibility="gone"/>
        <com.google.ads.AdView android:id="@+id/adView"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:gravity="center_horizontal"
            ads:adUnitId="a14d6125d95c70b"
            ads:adSize="BANNER"
            ads:testDevices="TEST_EMULATOR, 015d1884222bfe01"/>
    </LinearLayout>
    

    Note that the ListView has android:layout_height="0dp" and android:layout_weight="1". This tells it to expand to fill any space left over after placing the other elements in the LinearLayout.

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

Sidebar

Related Questions

I am currently working on an android project and I am having a problem
I am currently working on an android project and I am having an issue
I'm having an Android GPS project for my CS class. Right now I'm working
I am working on an android project where I am using a ListView and
I am working on an android project and I am facing a problem and
Good day. I'm having some issues with my android project specifically listview. I tried
I'm currently working on debugging some code with my android project. I'm having an
Working with android project and i got a problem on customized overlay class i
I am working on android project and am making using of a ListView that
I am currently working on an Android project in Eclipse and i am having

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.