[android] Review fixes.

This commit is contained in:
Roman Romanov 2016-12-19 08:19:14 +04:00
parent f8bd0b218a
commit 3f1df0d919
2 changed files with 13 additions and 3 deletions

View file

@ -128,10 +128,10 @@ final class BannerController implements View.OnClickListener
mFrame.setOnClickListener(this);
}
int close()
boolean close()
{
if (!isShowing() || mBanner == null || !mIsOpened)
return 0;
return false;
mIsOpened = false;
setFrameHeight((int) mCloseFrameHeight);
@ -148,6 +148,11 @@ final class BannerController implements View.OnClickListener
mTitle.setMaxLines(1);
mFrame.setOnClickListener(null);
return true;
}
int getLastBannerHeight()
{
return mFrame.getHeight();
}

View file

@ -806,9 +806,14 @@ public class PlacePageView extends RelativeLayout
if (mBannerController != null)
{
if ((state == State.HIDDEN || state == State.PREVIEW) && !UiUtils.isLandscape(getContext()))
heightCompensation = mBannerController.close();
{
if (mBannerController.close())
heightCompensation = mBannerController.getLastBannerHeight();
}
else
{
mBannerController.open();
}
}
if (mHeightCompensationView != null)