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

  • Home
  • SEARCH
  • 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 9078987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:44:47+00:00 2026-06-16T19:44:47+00:00

I have declared adMob on manifest like <activity android:name=com.google.ads.AdActivity android:configChanges=keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize /> It is resized

  • 0

I have declared adMob on manifest like

<activity 
           android:name="com.google.ads.AdActivity"
          android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
          />

It is resized properly when device rotacion but now I must add android:configChanges="keyboardHidden|orientation" to activity that contains adMob in order to prevent activity reloading. I am reaching it but now adMob is not scaled when landscape. onConfigChanges event I could now force adMob to be resized with proper landscape dimensions. How? thank you.

@Override
    public void onConfigurationChanged(Configuration newConfig) {
      super.onConfigurationChanged(newConfig);
    }
  • 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-16T19:44:48+00:00Added an answer on June 16, 2026 at 7:44 pm

    I faced the same problem, but found a work-around.

    My AdView sits at the bottom of the page, inside of a Relative layout. It looks correct when loaded, so I assumed the LayoutParams were correct. To fix this issue, I had to remove everything from the RelativeLayout, create a new AdView, and add it all back in the correct order, with the original LayoutParams.

    Something like:

    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
    
        AdView adView = (AdView)findViewById(R.id.adView);
        View contentFrame = findViewById(R.id.contentFrameLayout);
    
        RelativeLayout parent = (RelativeLayout) adView.getParent();
        LayoutParams mapFrameParams = contentFrame.getLayoutParams();
        LayoutParams adViewParams = adView.getLayoutParams();
    
        parent.removeView(adView);
        parent.removeView(contentFrame);
    
        AdView newAdView = new AdView(this, AdSize.SMART_BANNER, getString(R.string.admob_pubId));
    
        newAdView.setId(R.id.adView);
    
        parent.addView(newAdView, adViewParams);
        parent.addView(contentFrame,mapFrameParams);
        newAdView.loadAd(new AdRequest());
    }
    

    This works for me, but still feels like a hack.

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

Sidebar

Related Questions

Ok I have declared my main.xml as follows <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=wrap_content
I have declared a global variable like below extern NSString *name; @interface viewcontrollerOne{} in
Possible Duplicate: Admob Error in Eclipse for android:configChanges I want to display AdMob's ads
I have declared a variable like this @{ int i = 1; } Now,
I have declared std::priority_queue like this. priority_queue < Aircraft, vector<Aircraft>, less<Aircraft> > *q; And
I have declared two string buffers like, private StringBuffer buf = new StringBuffer(1024); private
I have declared an enum in my server code, and would like my client
I have declared my array like this: FT_Interface<4096> *to_make_ft[3] = { /* initialization with
I have declared the launch mode of my activity to be singleTask. If I
I have declared the PreApplicationStartMethodAttribute on the assembly level like this: [assembly: PreApplicationStartMethod(typeof(MyApp.Global), InitializeApplication)]

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.