admob center banner

Monkey Targets Forums/Android/admob center banner

freedo(Posted 2014) [#1]
Hi, I have got adds to appear in my app which is great.

I set this up using the brl.admob class in its default setting ie.

admob.showadview 1,layout ..

This set the banner add to the upper left of the device.

Have since tried to change these but does not seem to affect is position.

I am trying to center the banner by changing the style,layout paramaters but seems
to have no effect.

also that routine in the class does'nt make any sence...

layout+=1
if layout=7 layout=1..

why not have layout=1 in the first place...?

any idea's chap's..


therevills(Posted 2014) [#2]
Have you read the docs?
http://www.monkeycoder.co.nz/docs/html/Modules_brl.admob_Admob.html#ShowAdView

To center the banner, only set the layout:
admob.ShowAdView(1, 2)


also that routine in the class does'nt make any sence...

layout+=1
if layout=7 layout=1..


Where is this code? I don't see it in the module for AdMob... but to me the coder wants to move the Ads around all the positions and then start again - the issue with that is that every time you call ShowAdView it will get a new Ad which will take time to get, so unless there is a delay when increasing the layout I don't think this will display correctly.


freedo(Posted 2014) [#3]
Thanks Mate, got it now.


rIKmAN(Posted 2014) [#4]
Where is this code? I don't see it in the module for AdMob...


It's in the Monkey Help.
If you F1 over ShowAdView etc it's the example code for the AdMob module.


therevills(Posted 2014) [#5]
LOL! Thanks Rik! I didn't even see that example!

http://www.monkeycoder.co.nz/docs/html/examples/brl_admob_Admob.monkey