[android] Added banner initial height setting to fix incorrect size of banner when it's loaded and pp is expanded already

This commit is contained in:
Александр Зацепин 2019-02-27 18:56:42 +03:00 committed by Aleksey Belousov
parent ade48e8b97
commit d4d5259006

View file

@ -430,14 +430,25 @@ final class BannerController
{
open();
loadIcon(mCurrentAd);
setBannerInitialHeight(mOpenedHeight);
}
else
{
close();
setBannerInitialHeight(mClosedHeight);
mBannerStateListener.onBannerPreview(mCurrentAd);
}
}
private void setBannerInitialHeight(int height)
{
LOGGER.d(TAG, "Set banner initial height = " + height);
ViewGroup banner = mContainerView.findViewById(R.id.banner);
ViewGroup.LayoutParams lp = banner.getLayoutParams();
lp.height = height;
banner.setLayoutParams(lp);
}
private class MyNativeAdsListener implements NativeAdListener
{
@Nullable