small refactoring p.2
This commit is contained in:
parent
8d9ae28ddf
commit
63b50fbc20
2 changed files with 8 additions and 6 deletions
|
@ -53,7 +53,6 @@ public class RouteLineAppearanceFragment extends ContextMenuScrollFragment
|
||||||
private int toolbarHeightPx;
|
private int toolbarHeightPx;
|
||||||
private DayNightMode initMapTheme;
|
private DayNightMode initMapTheme;
|
||||||
private DayNightMode selectedMapTheme;
|
private DayNightMode selectedMapTheme;
|
||||||
private HeaderUiAdapter headerUiAdapter;
|
|
||||||
private HeaderInfo selectedHeader;
|
private HeaderInfo selectedHeader;
|
||||||
|
|
||||||
private View buttonsShadow;
|
private View buttonsShadow;
|
||||||
|
@ -311,12 +310,16 @@ public class RouteLineAppearanceFragment extends ContextMenuScrollFragment
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateHeaderState() {
|
private void updateHeaderState() {
|
||||||
|
HeaderInfo header;
|
||||||
if (getBottomScrollView().getScrollY() > colorCard.getViewHeight() + headerTitle.getBottom()) {
|
if (getBottomScrollView().getScrollY() > colorCard.getViewHeight() + headerTitle.getBottom()) {
|
||||||
selectedHeader = widthCard;
|
header = widthCard;
|
||||||
} else {
|
} else {
|
||||||
selectedHeader = colorCard;
|
header = colorCard;
|
||||||
|
}
|
||||||
|
if (header != selectedHeader) {
|
||||||
|
selectedHeader = header;
|
||||||
|
selectedHeader.onNeedUpdateHeader();
|
||||||
}
|
}
|
||||||
selectedHeader.onNeedUpdateHeader();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initVisibleRect() {
|
private void initVisibleRect() {
|
||||||
|
|
|
@ -107,7 +107,6 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont
|
||||||
private LayerDrawable previewIcon;
|
private LayerDrawable previewIcon;
|
||||||
|
|
||||||
private int routeLineColor;
|
private int routeLineColor;
|
||||||
private float routeLineWidth;
|
|
||||||
private Integer directionArrowsColor;
|
private Integer directionArrowsColor;
|
||||||
|
|
||||||
public RouteLayer(RoutingHelper helper) {
|
public RouteLayer(RoutingHelper helper) {
|
||||||
|
@ -467,7 +466,7 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont
|
||||||
} else {
|
} else {
|
||||||
widthKey = view.getSettings().ROUTE_LINE_WIDTH.getModeValue(helper.getAppMode());
|
widthKey = view.getSettings().ROUTE_LINE_WIDTH.getModeValue(helper.getAppMode());
|
||||||
}
|
}
|
||||||
return routeLineWidth = widthKey != null ? getWidthByKey(tileBox, widthKey) : attrs.paint.getStrokeWidth();
|
return widthKey != null ? getWidthByKey(tileBox, widthKey) : attrs.paint.getStrokeWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
Loading…
Reference in a new issue