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 DayNightMode initMapTheme;
|
||||
private DayNightMode selectedMapTheme;
|
||||
private HeaderUiAdapter headerUiAdapter;
|
||||
private HeaderInfo selectedHeader;
|
||||
|
||||
private View buttonsShadow;
|
||||
|
@ -311,12 +310,16 @@ public class RouteLineAppearanceFragment extends ContextMenuScrollFragment
|
|||
}
|
||||
|
||||
private void updateHeaderState() {
|
||||
HeaderInfo header;
|
||||
if (getBottomScrollView().getScrollY() > colorCard.getViewHeight() + headerTitle.getBottom()) {
|
||||
selectedHeader = widthCard;
|
||||
header = widthCard;
|
||||
} else {
|
||||
selectedHeader = colorCard;
|
||||
header = colorCard;
|
||||
}
|
||||
if (header != selectedHeader) {
|
||||
selectedHeader = header;
|
||||
selectedHeader.onNeedUpdateHeader();
|
||||
}
|
||||
selectedHeader.onNeedUpdateHeader();
|
||||
}
|
||||
|
||||
private void initVisibleRect() {
|
||||
|
|
|
@ -107,7 +107,6 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont
|
|||
private LayerDrawable previewIcon;
|
||||
|
||||
private int routeLineColor;
|
||||
private float routeLineWidth;
|
||||
private Integer directionArrowsColor;
|
||||
|
||||
public RouteLayer(RoutingHelper helper) {
|
||||
|
@ -467,7 +466,7 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont
|
|||
} else {
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue