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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:09:38+00:00 2026-06-13T01:09:38+00:00

i have some troubles on layout on displaying ads from admob. When the app

  • 0

i have some troubles on layout on displaying ads from admob.

When the app is justed started there is no ad, everything is fine. the layout occupies the whole screen.
then when the app can load the ad (at the top), the whole layout will shift down so as to display the ad.

it would be much better if the whole layout will not shift down when have ad, i.e. how to set codes such that i can reserve a blank background at the banner place, such that when there is no ad, it show the blank backgorund (and not affecting the remaining layout) and when there is ad, it replace the location of the blank background and the remaining layout still fix at its original place?

Also, i would like to ask whether in the code ads:refreshInterval=”15000″ means refreshing the ad in 15 sec? i test and it seems that the ad does not refresh any as specified?

Many thanks!!

Codes as follows:

<?xml version="1.0" encoding="utf-8"?>
<TableLayout android:id="@+id/tableLayout" 
   android:layout_width="match_parent" 
   android:layout_height="match_parent" 
   android:stretchColumns="*" 
   android:background="@color/light_green"
   android:orientation="vertical" 
   xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"  
   xmlns:android="http://schemas.android.com/apk/res/android">

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

    <TableRow
        android:id="@+id/tableRow0"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingRight="8dp" >
    ...
  • 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-13T01:09:39+00:00Added an answer on June 13, 2026 at 1:09 am

    In your AdView, you can set android:layout_height="50dp" to make the container take up space even when the ad is not present.

    ads:refreshInterval is not a valid property, so it is ignored. The refresh rate is set in the AdMob UI and can’t be changed in your app code.

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

Sidebar

Related Questions

I have some troubles with getting the data from the website. The website source
I have some troubles with a method having a typed List parameter, inherited from
I have some troubles while writing logs from log4net to the file. I seem
i have some troubles implementing this layout: http://deconcini.net/maurer-schneebacher/projekte/elisabethinum.html Basically i would like to display
I have some troubles with my school project. I have a class: #include Group.h
I have some troubles with plotting the figure. I have a file with some
I have some troubles mapping a JSON Array to RestKit. This is what the
I have some troubles with positioning my label/password field. With this code they both
I have some troubles with receiving data on server side. Here goes the code:
Right now I have some troubles. I'm finding a way to solve one problem.

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.