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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:48:29+00:00 2026-05-26T08:48:29+00:00

How to display adview on other view(custom view) in android ? I need to

  • 0

How to display adview on other view(custom view) in android ?
I need to play ads on custom view.
This is the xml I am using.

<RelativeLayout>

<Button
android:id="@+id/btnmenu"
android:layout_width="fill_parent"
android:layout_height="35dp"
android:text="Menu"
android:typeface="sans"
android:textStyle="bold|italic"
android:gravity="center"
android:textColor="@drawable/white"
android:layout_gravity="center_horizontal"
>
</Button>

<com.google.ads.AdView 
android:id="@+id/adView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
ads:adUnitId="XXXXXXXX"
ads:adSize="BANNER"
ads:loadAdOnCreate="true"/>

<view
class="com.android.MainScreen" 
android:id="@+id/note"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/btnmenu"
android:padding="10dip"
android:scrollbars="vertical"
android:fadingEdge="vertical" />

</RelativeLayout>  

Any help would be appreciated.

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

    Try moving your AdView below your custom view in the XML file. It may be drawing the custom view on top of the AdView. You’ll also want to set the AdView’s position below the button like you are doing with your custom view with android:layout_below="@+id/btnmenu".

    <view
    class="com.android.MainScreen" 
    android:id="@+id/note"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_below="@+id/btnmenu"
    android:padding="10dip"
    android:scrollbars="vertical"
    android:fadingEdge="vertical" />
    
    <com.google.ads.AdView 
    android:id="@+id/adView"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_below="@+id/btnmenu"
    ads:adUnitId="XXXXXXXX"
    ads:adSize="BANNER"
    ads:loadAdOnCreate="true"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I attempted to display adds using code below. I got the error AdView missing
My custom view does not display entirely. Please see my screenshot: And the source
Hai I used basic code for adwhirl to display ads by using AdWhirl. I
I made a custom view to satisfy my need for an easy way to
I'm using a custom layout to display preferences so that I can insert an
I am trying to get AdMob ads to display in my android application and
I display the contents of a table in the database using a ListBox. Each
I display set of images(small). I need to show the larger image(300*300) at some
I would like to display details of an xml error log to a user
I'd like to display 100 floating cubes using DirectX or OpenGL . I'm looking

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.