Compare commits
2 commits
master
...
Hide-widge
Author | SHA1 | Date | |
---|---|---|---|
|
1237f8a891 | ||
|
6ec3c371cd |
2 changed files with 18 additions and 1 deletions
|
@ -12,6 +12,7 @@ import android.view.View;
|
|||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewGroup.MarginLayoutParams;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
|
@ -1883,7 +1884,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
|
|||
}
|
||||
|
||||
private void enterMeasurementMode() {
|
||||
MapActivity mapActivity = getMapActivity();
|
||||
final MapActivity mapActivity = getMapActivity();
|
||||
MeasurementToolLayer measurementLayer = getMeasurementLayer();
|
||||
if (mapActivity != null && measurementLayer != null) {
|
||||
measurementLayer.setInMeasurementMode(true);
|
||||
|
@ -1902,6 +1903,20 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
|
|||
R.id.map_search_button,
|
||||
R.id.map_quick_actions_button);
|
||||
|
||||
final View widgetRight = mapActivity.findViewById(R.id.map_right_widgets_panel);
|
||||
widgetRight.setTag(widgetRight.getVisibility());
|
||||
widgetRight.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
int newVis = widgetRight.getVisibility();
|
||||
if ((int) widgetRight.getTag() != newVis) {
|
||||
widgetRight.setTag(widgetRight.getVisibility());
|
||||
AndroidUiHelper.setVisibility(mapActivity, portrait ? View.INVISIBLE : View.GONE,
|
||||
R.id.map_right_widgets_panel);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
View collapseButton = mapActivity.findViewById(R.id.map_collapse_button);
|
||||
if (collapseButton != null && collapseButton.getVisibility() == View.VISIBLE) {
|
||||
wasCollapseButtonVisible = true;
|
||||
|
|
|
@ -333,6 +333,7 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL
|
|||
}
|
||||
|
||||
private void drawBeforeAfterPath(Canvas canvas, RotatedTileBox tb) {
|
||||
canvas.rotate(-tb.getRotate(), tb.getCenterPixelX(), tb.getCenterPixelY());
|
||||
List<TrkSegment> before = editingCtx.getBeforeSegments();
|
||||
List<TrkSegment> after = editingCtx.getAfterSegments();
|
||||
if (before.size() > 0 || after.size() > 0) {
|
||||
|
@ -379,6 +380,7 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL
|
|||
GeometryWay.calculatePath(tb, tx, ty, path);
|
||||
canvas.drawPath(path, lineAttrs.paint);
|
||||
}
|
||||
canvas.rotate(tb.getRotate(), tb.getCenterPixelX(), tb.getCenterPixelY());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue