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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:07:25+00:00 2026-06-07T07:07:25+00:00

I am working on an android project and just downloaded the latest version of

  • 0

I am working on an android project and just downloaded the latest version of the admob sdk.

I am trying to position the ad at the bottom of the screen but nothing I try seems to work.

Below is the XML code for the layout

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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: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="wrap_content">
    </ListView>
        <com.google.ads.AdView android:id="@+id/adView"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            ads:adUnitId="MY_ID"
            ads:adSize="BANNER"
            ads:testDevices="TEST_EMULATOR, emulator-5554"
            ads:loadAdOnCreate="true">
        </com.google.ads.AdView>
</LinearLayout>

I have tried making the ListView as well as the LinearLayout fill_parent on the height but then in the logcat is says that there’s not enough room to display the ad.

I’ve also tried wrapping the ad in a linear layout and saying align parent bottom = true but that doesn’t make a difference.

Instead the advert gets placed directly at the bottom of the list view, therefore if the list view is half empty the advert is in the middle of the screen.

What I want is the advert to always be visible at the bottom of the screen no matter how big or small the list view is.

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-07T07:07:26+00:00Added an answer on June 7, 2026 at 7:07 am

    change your parent layout to a RelativeLayout

    use android:layout_alignParentBottom="true" on the adView and android:layout_above="@+id/adView" on your ListView.

    Use android:layout_below="@+id/xxxx" on the rest of your views as needed to make them behave the same as the do with your LinearLayout

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

Sidebar

Related Questions

i am working on a android project for my assignment. i am trying to
I'm working in a android project the idea is simple: I just need to
I'm just trying to setup my Android Project with ORMLite. I'm using Roboguice for
I just started working on a new Eclipse Android project and want to make
I just started working with Android apps and was trying few sample programs. I
I have just been working on my android project in eclipse and all of
I am currently working on android project where I am using a custom list
I am currently working on android project where I want to have a text
I am working on an android project where I am using a ListView and
I am working on an android project and I am using a spinner which

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.