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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:03:42+00:00 2026-05-23T09:03:42+00:00

I have layout structure: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <com.google.ads.AdView android:layout_width="fill_parent" android:layout_height="wrap_content" ads:adSize="BANNER"

  • 0

I have layout structure:

<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="vertical" >
  <com.google.ads.AdView 
   android:layout_width="fill_parent"
   android:layout_height="wrap_content"
   ads:adSize="BANNER"
  />
    
  <LinearLayout style="@style/TitleBar"
   android:layout_width="fill_parent"
   android:layout_height="45dip"
    // title bar
  </LinearLayout>
  
<RelativeLayout
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="vertical"
  // main layout with all needed elements and background!" >
  
</RelativeLayout>
</LinearLayout>

Everything look fine, until my AdMob disappered. Then I can see empty black region with admob size.

UPDATE: my screen shot:
enter image description here

normally I cas see here ad block, but when I get onFailedToReceiveAd(Ad request successful, but no ad returned due to lack of ad inventory.) ad disappers and my layout not fill all screen.

  • 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-23T09:03:42+00:00Added an answer on May 23, 2026 at 9:03 am

    What you describe looks weird…
    The reason I believed caused an ad to disappear was in case an ad is refreshed and then no ad is served due to lack of ad on AdMob side.
    But from my own test, once an ad is loaded, if a subsequent ad refresh fails, the previous ad stays displayed, I haven’t seen ads ‘disappear’.

    Maybe you could look at logcat and see if you get any errors there.

    Here is some code I used to test Ad Request delivery/failure on my own app.
    In case the blanks appears after an Ad fails loading, I suppose you could put some code inside the onFailedToReceiveAd to resize the AdView

    AdView av = (AdView)findViewById(R.id.adView);
    
            // Set AdListener
            av.setAdListener(new AdListener() {
                AdView av = (AdView)findViewById(R.id.adView);
                @Override
                public void onFailedToReceiveAd(Ad ad, ErrorCode error) {
                    System.err.println("Ad failed: " + ad.toString() + error.toString());
                    av.setVisibility(AdView.GONE);//By setting visibility to GONE, you hide the AdView, but the AdView won't refresh automaticaly anymore.
    
                }
    
                @Override
                public void onReceiveAd(Ad ad) {
                    System.out.println("Ad received: " + ad.toString());
                    av.setVisibility(AdView.VISIBLE);
                }
            });
    
            // Create an ad request.
            AdRequest adRequest = new AdRequest();
    
            // Start loading the ad in the background.
            av.loadAd(adRequest);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a layout defined in XML. It contains also: <RelativeLayout android:id=@+id/item android:layout_width=fill_parent android:layout_height=wrap_content
I have the following layout structure: ScrollView - LinearLayout - TextView - ImageView -
I have different layout files for different screens size like Folder Structure: layout layout-large
I have a layout which might be a bit unusual. The structure is the
I am beginner.I have the following div structure in zend layout.phtml <div id='outer'>//start outer
I have a 2 column layout, which structured something like this: html structure: #container
My layout structure is like this LinearLayout FrameLayout ImageView ImageView FrameLayout TextView LinearLayout I
I have a program that generates a plain text file. The structure (layout) is
I have a table-like scrollable view with sections. The layout structure is on the
I have a dynamic layout with this structure. With this structure I need to

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.