Re: Ads not not displayed in portrait mode if application switched from landscape to portrait

525 views
Skip to first unread message

Kunal Verma

unread,
May 23, 2013, 2:43:33 PM5/23/13
to Google AdMob Ads Developers
The thing about SMART_BANNER is that it does not stretches Image Ads as per the layout which in your case is Landscape. Are you using TEST_ADS while testing? Because if you are getting a real Ad but that is an Image Ad, it wont be stretched. It will remain as it was in PORTRAIT whereas the Text Ads will be set as per the layout.
Also are you setting the value of WIDTH and HEIGHT while implementing SMART_BANNER?
You just need to have wrap_content or fill_parent (whichever you prefer) for both.

Secondly, By dynamic width, you mean to say, you are not giving an value to width in dpi now? Were you giving before?
You dont need to.


On Wed, May 22, 2013 at 5:39 AM, Swapnil Narkhede <swapn...@gmail.com> wrote:
I am working on one application if I launch application in portrait mode then ads showing in full width of device but if I switched to landscape mode it's not showing full width it's showing exactly same size banner as in portrait mode(using SMART_BANNER).
in other case if I launch application in landscape mode it's shows the banner full width of the device but if switched to portrait mode ads not showing giving warning  "Not enough space to show ad! Wants: <1279, 66>, Has: <800, 1183>" I tried to give dynamic width to the banner but still it's not working 
please help me here 

--
 
---
You received this message because you are subscribed to the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

James

unread,
May 24, 2013, 1:02:33 AM5/24/13
to google-adm...@googlegroups.com
I think i also met this problem before. You can check my example here. I hope it will help you out.


On Wed, May 22, 2013 at 8:39 PM, Swapnil Narkhede <swapn...@gmail.com> wrote:
I am working on one application if I launch application in portrait mode then ads showing in full width of device but if I switched to landscape mode it's not showing full width it's showing exactly same size banner as in portrait mode(using SMART_BANNER).
in other case if I launch application in landscape mode it's shows the banner full width of the device but if switched to portrait mode ads not showing giving warning  "Not enough space to show ad! Wants: <1279, 66>, Has: <800, 1183>" I tried to give dynamic width to the banner but still it's not working 
please help me here 

--
 
---
You received this message because you are subscribed to the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Personal Website: http://jmsliu.com

Eric Leichtenschlag

unread,
May 24, 2013, 2:45:22 PM5/24/13
to google-adm...@googlegroups.com
HI Swapnil,

You probably have a config change on orientation. Unfortunately, it's a known issue that smart banner is not compatible with config changes. Once the AdView is created, its physical size needs to stay the same. To work around this, in your onConfigurationChanged method, you'll have to remove the AdView from your layout, and create a new one with the SMART_BANNER size and add the new version back into your layout. Or, if you no longer wish to use configChanges, you can let Android automatically recreate the new activity.

Thanks,
Eric

On Thursday, May 23, 2013 10:02:33 PM UTC-7, leo.Ja...@gmail.com wrote:
I think i also met this problem before. You can check my example here. I hope it will help you out.
On Wed, May 22, 2013 at 8:39 PM, Swapnil Narkhede <swapn...@gmail.com> wrote:
I am working on one application if I launch application in portrait mode then ads showing in full width of device but if I switched to landscape mode it's not showing full width it's showing exactly same size banner as in portrait mode(using SMART_BANNER).
in other case if I launch application in landscape mode it's shows the banner full width of the device but if switched to portrait mode ads not showing giving warning  "Not enough space to show ad! Wants: <1279, 66>, Has: <800, 1183>" I tried to give dynamic width to the banner but still it's not working 
please help me here 

--
 
---
You received this message because you are subscribed to the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages