floatinghotpot / cordova-plugin-flurry

Cordova plugin to support Flurry (analytics and advertisement)
MIT License
19 stars 13 forks source link

Banner ad is always repositioned to the top of screen when an interstitial is created. #3

Closed blakgeek closed 9 years ago

blakgeek commented 10 years ago

If I have a page with the banner at the bottom and then display an interstitial the banner moves to the top of the screen. This is happening because you set the value of bannerAtTop every time you call createBannerView and the method createInterstitialView is hardcoded to call createBannerView passing true for bannerAtTop.

To fix the issue just remove the following line from the createInterstitialView method

inputs.put(POSITION_AT_TOP_ARG_INDEX, true);

and replace this line in the createBannerView method

this.bannerAtTop = inputs.getBoolean( POSITION_AT_TOP_ARG_INDEX);

with this

bannerAtTop = inputs.optBoolean( POSITION_AT_TOP_ARG_INDEX, bannerAtTop);

This will ensure that bannerAtTop keeps it's value unless the caller wants it to change.

floatinghotpot commented 9 years ago

it's fixed, the plugin has been totoally re-written.

lots of features are added, same API with other Ad plugins.