java - AdMob SMART_BANNER problems -
I have a SMART_BANNER under my app.
SMART_BANNER has been declared in Layout XML like this:
& lt; Relative layout xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: tools = "http://schemas.android com / tools" xmlns: app = "http: // schemas. Android.com/apk/res-auto "Android: Android: Android: layout_width =" wrap_content "Android: layout_height =" wrap_content "Android: orientation =" vertical "tool: reference =" main activity "& gt; & Lt; WebView Android: id = "@ + id / webview" Android: layout_width = "match_parent" Android: layout_height = "match_parent" /> & Lt; Com.google.android.gms.ads.AdView xmlns: ads = "http://schemas.android.com/apk/res-auto" Android: id = "@ + id / adView" Android: layout_width = "Match_parent" Android: layout_height = "wrap_content" android: layout_alignParentBottom = "true" app: adSize = "SMART_BANNER" app: adUnitId = "ca-app-pub-xxxxxxxxx" /> & Lt; / RelativeLayout & gt;
This is in my Android manifest:
& lt; Activity Android: name = "com.google.android.gms.ads.ad.AdActivity" Android: configChanges = "keyboard | keyboardHide | orientation | screen layout | uidod | screensaase | small screen size" />
More ads are initialized in Create such as:
if (Build.VERSION.SDK_INT> Build.VERSION_CODES.FROYO) { AdView adView = (preview) this.findViewById (R.id.adView); AdRequest adRequest = New AdRequest.Builder () .addTestDevice (AdRequest.DEVICE_ID_EMULATOR) .addTestDevice ("TEST_DEVICE_ID") .build (); AdView.loadAd (adRequest); }
Ads show when the app starts in portrait mode; When I place a phone in landscape mode, the ads are expanded and all the available space is not filled ... Ads are shown even when the app starts in landscape mode, but when I call in Portrait mode, Logcat Show:
There is not enough room to show ads!
Why? How can I fix these problems?
Sorry for my bad english, thanks in advance!
Comments
Post a Comment