I'm trying to use the newly released Google admob SDK (GoogleAdMobAdsSdkAndroid-4.0.4).
The following:
LinearLayout layout = (LinearLayout)findViewById(R.id.my_layout);
AdView adView = new AdView(this, AdSize.BANNER,"my_publisher_id");
layout.addView(adView);
AdRequest request = new AdRequest();
request.setTesting(true);
adView.loadAd(request);
is working just fine in an Activity. However, when I include the above Activity within a TabActivity, AdView stops working and says:
WARN/Ads(17559): Not enough space to show ad! Wants: <480, 75>, Has: <448, 495>
Any idea how can I include AdView within a TabActivity? Not necessarily within each Activity, I'd be happy with the AdView just on top of the Tabs, but that is not working neither.
Many TIA
The problem was in the padding on the LinearLyout that is within the Tabhost. Removed padding and problem solved.
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