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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:43:13+00:00 2026-05-19T03:43:13+00:00

I’m trying to integrate ads (admob) into my Android app. It’s mostly working, except

  • 0

I’m trying to integrate ads (admob) into my Android app. It’s mostly working, except for one issue with the layout. My layout consists of:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    xmlns:app="http://schemas.android.com/apk/res/com.example.photos">

    <LinearLayout android:orientation="horizontal"
        android:layout_width="wrap_content" android:layout_height="wrap_content"
        android:id="@+id/status_layout">

        <ImageView android:id="@+id/cardStatus"
            android:layout_width="wrap_content" android:layout_height="wrap_content" />

        <TextView android:layout_width="fill_parent"
            android:layout_height="wrap_content" android:text="@string/hello"
            android:id="@+id/cardStatusText" />

    </LinearLayout>

    <GridView android:id="@+id/imageGridView"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:padding="10dp" android:verticalSpacing="10dp"
        android:horizontalSpacing="10dp" android:numColumns="auto_fit"
        android:columnWidth="100dp" android:stretchMode="columnWidth"
        android:gravity="center" android:layout_below="@id/status_layout" />



    <!-- Place an AdMob ad at the bottom of the screen. -->
    <!-- It has white text on a black background. -->
    <!-- The description of the surrounding context is 'Android game'. -->
    <com.admob.android.ads.AdView android:id="@+id/ad"
        android:layout_width="fill_parent" android:layout_height="wrap_content"
        android:layout_alignParentBottom="true" app:backgroundColor="#000000"
        app:primaryTextColor="#FFFFFF" app:secondaryTextColor="#CCCCCC"
        app:keywords="Android Photo" />


</RelativeLayout>  

The ads are shown at the bottom of the screen, just as I want. However, they seem to be overlayed or drawn on top of the bottom portion of the grid view. I would like the gridview to be shorter, so that the ad can fill the bottom portion of the screen, and not hide part of the gridview. The problem is most annoying when you scroll all the way to the bottom of the gridview, and you still cannot fully see the last row items in the grid due to the ad.

I’m not sure if this is the standard way that AdMob ads work. If this is the case, adding some padding to the bottom of the grid (if that’s possible) would due the trick. That way the user can scroll a bit further, and see the last row in addition to the ad.

I just switched from using LinearLayout to RelativeLayout after reading some similar issues with ListViews. Now my ad is along the bottom instead of above the grid, so I’m getting closer.

Thoughts?
-Kevin

  • 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-19T03:43:14+00:00Added an answer on May 19, 2026 at 3:43 am

    put this property in your gridview

    android:layout_above="@+id/ad"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I am trying to loop through a bunch of documents I have to put
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure

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.