[android] Added discarding of banner size when new native ad is loaded to avoid problem when banner ratio greater 0 and user taps on different map object

This commit is contained in:
Александр Зацепин 2019-02-25 14:33:16 +03:00 committed by Aleksey Belousov
parent ea9968fc61
commit c8114de9d7
2 changed files with 9 additions and 0 deletions

View file

@ -301,6 +301,11 @@ final class BannerController
}
}
private void discardBannerSize()
{
zoomOut(0);
}
private void measureBannerSizes()
{
boolean currentState = mOpened;
@ -446,6 +451,7 @@ final class BannerController
return;
unregisterCurrentAd();
discardBannerSize();
mCurrentAd = new NativeAdWrapper(ad);
if (mLastAdType != mCurrentAd.getType())

View file

@ -279,6 +279,9 @@ public class BottomSheetPlacePageController implements PlacePageController, Loca
return;
}
// If banner details are little bit or completely opened we haven't to change the peek height,
// because the peek height is reasonable only for collapsed state and banner details are always
// closed in collapsed state.
if (mBannerRatio > 0)
return;