forked from organicmaps/organicmaps
[android] Fixed compass arrow for pp
This commit is contained in:
parent
6b570ab183
commit
638a537eb1
1 changed files with 9 additions and 1 deletions
|
@ -322,7 +322,7 @@ public class BottomSheetPlacePageController implements PlacePageController, Loca
|
|||
@Override
|
||||
public boolean isClosed()
|
||||
{
|
||||
return mPlacePageBehavior.getState() == AnchorBottomSheetBehavior.STATE_HIDDEN;
|
||||
return isHiddenState(mPlacePageBehavior.getState());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -334,6 +334,9 @@ public class BottomSheetPlacePageController implements PlacePageController, Loca
|
|||
@Override
|
||||
public void onCompassUpdated(long time, double magneticNorth, double trueNorth, double accuracy)
|
||||
{
|
||||
if (isHiddenState(mPlacePageBehavior.getState()))
|
||||
return;
|
||||
|
||||
double north = trueNorth >= 0.0 ? trueNorth : magneticNorth;
|
||||
mPlacePage.refreshAzimuth(north);
|
||||
}
|
||||
|
@ -502,6 +505,11 @@ public class BottomSheetPlacePageController implements PlacePageController, Loca
|
|||
return state == AnchorBottomSheetBehavior.STATE_EXPANDED;
|
||||
}
|
||||
|
||||
private static boolean isHiddenState(@AnchorBottomSheetBehavior.State int state)
|
||||
{
|
||||
return state == AnchorBottomSheetBehavior.STATE_HIDDEN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldShowBannerDetails()
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue