I used this code to place my admob ads, but these code will show the ads on top left of the screen, How to place the ads bottom center of the screen? please help :)
mAdView = new AdView(this, AdSize.BANNER, "xxxxx");
FrameLayout layout = (FrameLayout)findViewById(R.id.game_layout);
layout.addView(mAdView);
FrameLayout.LayoutParams adsParams = new FrameLayout.LayoutParams(LayoutParams.);
mAdView.setGravity(Gravity.BOTTOM);
mAdView.loadAd(new AdRequest());
The Height and Width layout Params for the FrameLayout should be FILL_PARENT. By Default it consider the height layout Param as WRAP_CONTENT and because of that even you have set the GRAVITY to BOTTOM your ads displayed on TOP. SET the Layout Params as I said.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With