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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:38:03+00:00 2026-06-04T16:38:03+00:00

I am a beginner so bear with me. I have a layout with several

  • 0

I am a beginner so bear with me. I have a layout with several buttons and then an adview at the bottom. When the ad loads, it pushes the buttons up and makes them very small. Is there anyway to prevent the content from being pushed up?

Here is my code

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/background_hdpi" >

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

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_above="@id/ad"
        android:orientation="vertical"
        android:weightSum="7.0" >

        <Button
            android:id="@+id/basics1"
            android:layout_width="150.0dip"
            android:layout_height="0.0dip"
            android:layout_gravity="center_horizontal"
            android:layout_marginBottom="2.0dip"
            android:layout_marginTop="100.0dip"
            android:layout_weight="1.0"
            android:text="Overview"
            android:textSize="16.0sp" />

        <Button
            android:id="@+id/basics2"
            android:layout_width="150.0dip"
            android:layout_height="0.0dip"
            android:layout_gravity="center_horizontal"
            android:layout_margin="2.0dip"
            android:layout_weight="1.0"
            android:text="Campaign"
            android:textSize="16.0sp" />

        <Button
            android:id="@+id/basics3"
            android:layout_width="150.0dip"
            android:layout_height="0.0dip"
            android:layout_gravity="center"
            android:layout_margin="2.0dip"
            android:layout_weight="1.0"
            android:text="Special Ops"
            android:textColor="#ff000000"
            android:textSize="16.0sp" />

        <Button
            android:id="@+id/basics4"
            android:layout_width="150.0dip"
            android:layout_height="0.0dip"
            android:layout_gravity="center_horizontal"
            android:layout_margin="2.0dip"
            android:layout_weight="1.0"
            android:text="Zombies"
            android:textColor="#ff000000"
            android:textSize="16.0sp" />

        <Button
            android:id="@+id/basics5"
            android:layout_width="150.0dip"
            android:layout_height="0.0dip"
            android:layout_gravity="center_horizontal"
            android:layout_margin="2.0dip"
            android:layout_weight="1.0"
            android:text="Modes"
            android:textColor="#ff000000"
            android:textSize="16.0sp" />

        <Button
            android:id="@+id/basics6"
            android:layout_width="150.0dip"
            android:layout_height="0.0dip"
            android:layout_gravity="center_horizontal"
            android:layout_margin="2.0dip"
            android:layout_weight="1.0"
            android:text="Ranks/Unlocks"
            android:textColor="#ff000000"
            android:textSize="16.0sp" />
    </LinearLayout>

</RelativeLayout>
  • 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-04T16:38:04+00:00Added an answer on June 4, 2026 at 4:38 pm

    You have a few options.

    1. Make your buttons a fixed size instead of weight dependent. Weights make your Buttons take up a fraction of the space available. So when the ad loads, the space available decreases and then your buttons become smaller.

    2. Change your RelativeLayout into a FrameLayout and put the ads after the button LinearLayout.

    3. Put everything inside ScrollView, ie:

    RelativeLayout -> ScrollView -> LinearLayout (height:wrap_content,width:fill_parent) -> AdView + LinearLayout with Buttons

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

Sidebar

Related Questions

I'm a Java-beginner, so please bear with this one. I have a class: class
Am Beginner to java.I have a small doubt while i am developing an application
Beginner programmer here....hope it makes sense :) I have created a console app that
Beginner programmer here. So bear with me. I have a simple python program. print
I'm a relative beginner with WPF so please bear with me. I have a
I am a beginner in jquery so please bear with me. I have a
I am a beginner in Haskell so please bear with me. (Just started learning
I am a beginner in SQLite, so please bear with me if what i'm
Beginner level question Scenario: Have simple string cocantation tool, that I might expand later
Beginner question: I have a dictionary where the values are lists of (a variable

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.