Merge pull request #9846 from osmandapp/minor_fixes

Minor UI fixes in plan route
This commit is contained in:
vshcherb 2020-09-18 16:10:24 +02:00 committed by GitHub
commit 281bf2e244
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 10 deletions

View file

@ -1960,12 +1960,14 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
setupDoneButton(view);
View shadow = view.getShadowView();
if (shadow != null) {
shadow.setVisibility(View.GONE);
AndroidUiHelper.updateVisibility(shadow, false);
}
}
private void setupDoneButton(TopToolbarView view) {
TextView done = view.getSaveView();
AndroidUiHelper.updateVisibility(done, isVisible());
Context ctx = done.getContext();
done.setAllCaps(false);
ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) done.getLayoutParams();

View file

@ -182,13 +182,6 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL
if (inMeasurementMode) {
lineAttrs.updatePaints(view.getApplication(), settings, tb);
TrkSegment before = editingCtx.getBeforeTrkSegmentLine();
new Renderable.StandardTrack(new ArrayList<>(before.points), 17.2).
drawSegment(view.getZoom(), lineAttrs.paint, canvas, tb);
TrkSegment after = editingCtx.getAfterTrkSegmentLine();
new Renderable.StandardTrack(new ArrayList<>(after.points), 17.2).
drawSegment(view.getZoom(), lineAttrs.paint, canvas, tb);
if (editingCtx.isInApproximationMode()) {
List<WptPt> originalTrackPointList = editingCtx.getOriginalTrackPointList();
if (originalTrackPointList != null) {
@ -198,6 +191,15 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL
drawSegment(view.getZoom(), lineAttrs.customColorPaint, canvas, tb);
}
}
TrkSegment before = editingCtx.getBeforeTrkSegmentLine();
new Renderable.StandardTrack(new ArrayList<>(before.points), 17.2).
drawSegment(view.getZoom(), lineAttrs.paint, canvas, tb);
TrkSegment after = editingCtx.getAfterTrkSegmentLine();
new Renderable.StandardTrack(new ArrayList<>(after.points), 17.2).
drawSegment(view.getZoom(), lineAttrs.paint, canvas, tb);
drawPoints(canvas, tb);
}
}
@ -206,7 +208,9 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL
public void onDraw(Canvas canvas, RotatedTileBox tb, DrawSettings settings) {
if (inMeasurementMode) {
lineAttrs.updatePaints(view.getApplication(), settings, tb);
drawBeforeAfterPath(canvas, tb);
if (!editingCtx.isInApproximationMode()) {
drawBeforeAfterPath(canvas, tb);
}
if (editingCtx.getSelectedPointPosition() == -1) {
drawCenterIcon(canvas, tb, settings.isNightMode());

View file

@ -148,7 +148,7 @@ public class SnapTrackWarningFragment extends BaseOsmAndFragment {
}
});
UiUtilities.setupDialogButton(nightMode, cancelButton, SECONDARY, R.string.shared_string_cancel);
UiUtilities.setupDialogButton(nightMode, applyButton, PRIMARY, R.string.shared_string_apply);
UiUtilities.setupDialogButton(nightMode, applyButton, PRIMARY, R.string.shared_string_continue);
AndroidUiHelper.updateVisibility(applyButton, true);
AndroidUiHelper.updateVisibility(view.findViewById(R.id.buttons_divider), true);
}