android - Not enough space to show ad (AdMob) -
I am trying to show ads in my activity, but it is always giving an error that "enough to show ads" No Location "
My XML file is:
Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" ad: adSize = "BANNER" Advertising: adUnitId = "@ string / adobebed android: Android: Android: Android: Android: com.google.ads.AdView Android: ID = "@ + ID / AdMyWid" "Android: Layout_linePrineBottom =" True "Android: Gravity =" Down | AdView = (AdView) FindViewById (R.id.adMobadView); AdRequest again = new AdRequest (); re.setTesting (correct); re.setGender (AdRequest.Gender.FEMALE); ad.loadAd (again);
:
02-18 14: 16: 17.869: W / WebCor (813): Can not get view after first layout 02- 18 14: 16: 17.979: come / Advertising (813): Honorsive () 02-18 14: 16: 17.979: W / Advertising (813): There is not enough room to show ads! : <320, 50>, is: <288, 430 & gt;
The left and right padding of your relative layout is the essential space for your AdView.
Change the RelativeLayout config to:
& lt; Relative layout xmlns : Android = "http://schemas.android.com/apk/res/android" ... Android: PaddingLeft = "0dp" Android: paddingRight = "0dp" ... & gt;
You may also want to change your AdView configuration to:
& lt; Com.google.ads.adview android: id = "@ + id / AdMobadView" Android: layout_width = "match_parent" Android: layout_height = "wrap_content" ... />
Because you do not really want to consume your full screen screen.
Comments
Post a Comment