forked from organicmaps/organicmaps
[android] Review fixes.
This commit is contained in:
parent
f8bd0b218a
commit
3f1df0d919
2 changed files with 13 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue