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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:38:12+00:00 2026-05-29T04:38:12+00:00

I am adding ads to my app (This is my first time) but it

  • 0

I am adding ads to my app (This is my first time) but it always overlap with my content (i.e. it is shown over my content).

My xml is:

<?xml version="1.0" encoding="utf-8"?>


<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:androidsam="http://schemas.android.com/apk/res/com.jameselsey"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">


<LinearLayout android:layout_width="fill_parent"
                  android:id="@+id/home_layout"
                  android:orientation="vertical"
                  android:layout_height="wrap_content"
                  android:background="@drawable/background">

     <TextView
        android:id="@+id/my_text"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:scrollbars="vertical"
        android:text="TextView2"
        android:textColor="#ffffff" 
        android:textColorHighlight="#000000"
        android:shadowColor="#000000"
        android:shadowDx="3"
        android:shadowDy="-3"
        android:shadowRadius="1.5"
        android:fadingEdge="horizontal"
        android:typeface="serif"
        android:layout_marginLeft="5dp"
        android:layout_marginRight="5dp"
        />

</LinearLayout>   





<LinearLayout 
                  xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
                  android:layout_width="fill_parent"
                  android:id="@+id/ad_layout"
                  android:layout_height="wrap_content"
                  android:layout_alignParentBottom="true"
                >
<com.google.ads.AdView android:id="@+id/adView"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         ads:adUnitId="a14f26e5d930307"
                         ads:adSize="BANNER"
                         ads:testDevices="TEST_EMULATOR, 33334750709D00EC"
                         ads:loadAdOnCreate="true"/>
    </LinearLayout>


</RelativeLayout>

The ad is shown at the bottom of the screen but it hides the end of the TextView!
Any ideas to do this without overlapping with the TextView ?

Thanks in advance 🙂

  • 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-29T04:38:13+00:00Added an answer on May 29, 2026 at 4:38 am

    You can use structure as given below. Align adView to android:layout_alignParentBottom="true" and align your LinearLayout above this adView by setting LinearLayout’s attribute to android:layout_above="@id/adView".

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout 
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:androidsam="http://schemas.android.com/apk/res/com.jameselsey"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" >
    
        <com.google.ads.AdView
            android:id="@+id/adView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            ads:adSize="BANNER"
            ads:adUnitId="xxxxxxxxxxxx"
            ads:loadAdOnCreate="true"
            ads:testDevices="TEST_EMULATOR" />
    
        <LinearLayout
            android:id="@+id/home_layout"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_above="@id/adView"
            android:background="@drawable/background"
            android:orientation="vertical" >
    
            <!-- Your layout components should be here-->
    
        </LinearLayout>
    
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my very first attempt at including ads in my app. I have
Id like to include AdMobs ads in my app, but Im not sure how
Do i need to put android app to market first before adding admob or
Adding Exceptional Handling is a good practise, but I have a doubt, In our
Adding the row one by one in the button click.. (i tried but its
When adding new properties to classes, I find myself typing the same things over
I am working on The ausdcf.org to try adding several banner ads in swf
I am adding some Javascript generated by Google's Adsense on my page, but there
I'm adding iAd on my app.... I managed to have the banner sliding from
after adding adMob ads to my application, I have noticed some strange memory behaviour.

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.