forked from organicmaps/organicmaps
[android] Fixed compass visibility
This commit is contained in:
parent
614988ab5f
commit
9f8cd778d6
2 changed files with 15 additions and 7 deletions
|
@ -1883,9 +1883,17 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
mPlacePage.refreshViews();
|
||||
}
|
||||
|
||||
private void adjustCompassAndTraffic(int offsetY)
|
||||
private void adjustCompassAndTraffic(final int offsetY)
|
||||
{
|
||||
adjustCompass(offsetY);
|
||||
addTask(new MapTask()
|
||||
{
|
||||
@Override
|
||||
public boolean run(MwmActivity target)
|
||||
{
|
||||
adjustCompass(offsetY);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
adjustTraffic(0, offsetY);
|
||||
}
|
||||
|
||||
|
@ -1901,7 +1909,11 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
return;
|
||||
|
||||
int toolbarHeight = mSearchController.getToolbar().getHeight();
|
||||
adjustCompassAndTraffic(visible ? toolbarHeight : UiUtils.getStatusBarHeight(this));
|
||||
int offset = mRoutingPlanInplaceController != null
|
||||
&& mRoutingPlanInplaceController.getHeight() > 0
|
||||
? mRoutingPlanInplaceController.getHeight() : UiUtils.getStatusBarHeight(this);
|
||||
|
||||
adjustCompassAndTraffic(visible ? toolbarHeight : offset);
|
||||
setNavButtonsTopLimit(visible ? toolbarHeight : 0);
|
||||
if (mFilterController != null)
|
||||
{
|
||||
|
@ -1934,7 +1946,6 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
refreshFade();
|
||||
if (mOnmapDownloader != null)
|
||||
mOnmapDownloader.updateState(false);
|
||||
adjustCompass(UiUtils.getCompassYOffset(this));
|
||||
if (show)
|
||||
{
|
||||
mSearchController.clear();
|
||||
|
|
|
@ -25,9 +25,6 @@ public class RoutingPlanInplaceController extends RoutingPlanController
|
|||
|
||||
public void show(final boolean show)
|
||||
{
|
||||
if (show == UiUtils.isVisible(mFrame))
|
||||
return;
|
||||
|
||||
if (show)
|
||||
UiUtils.show(mFrame);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue