forked from organicmaps/organicmaps
[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:
parent
ade48e8b97
commit
d4d5259006
1 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue