diff --git a/OsmAnd/res/layout-land/plan_route_info.xml b/OsmAnd/res/layout-land/plan_route_info.xml index 0cfca0ac48..55bb5b62f2 100644 --- a/OsmAnd/res/layout-land/plan_route_info.xml +++ b/OsmAnd/res/layout-land/plan_route_info.xml @@ -21,9 +21,8 @@ android:id="@+id/progress_bar" style="?android:attr/progressBarStyleHorizontal" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="4dp" android:max="100" - android:minHeight="0dp" android:visibility="gone" tools:progress="60" tools:visibility="visible" /> diff --git a/OsmAnd/res/layout/plan_route_info.xml b/OsmAnd/res/layout/plan_route_info.xml index 7d2923c0bb..2ce63937ea 100644 --- a/OsmAnd/res/layout/plan_route_info.xml +++ b/OsmAnd/res/layout/plan_route_info.xml @@ -21,9 +21,8 @@ android:id="@+id/progress_bar" style="?android:attr/progressBarStyleHorizontal" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="4dp" android:max="100" - android:minHeight="0dp" android:visibility="gone" tools:progress="60" tools:visibility="visible" /> diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenuFragment.java index d8c810d8bc..cdf684088e 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenuFragment.java @@ -4,6 +4,7 @@ import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager; +import android.support.v4.content.ContextCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -191,6 +192,11 @@ public class MapRouteInfoMenuFragment extends BaseOsmAndFragment { AndroidUtils.setTextSecondaryColor(ctx, (TextView) mainView.findViewById(R.id.DistanceTitle), nightMode); AndroidUtils.setTextPrimaryColor(ctx, (TextView) mainView.findViewById(R.id.DurationText), nightMode); AndroidUtils.setTextSecondaryColor(ctx, (TextView) mainView.findViewById(R.id.DurationTitle), nightMode); + + int bgColor = ContextCompat.getColor(ctx, nightMode + ? R.color.map_progress_bar_bg_dark : R.color.map_progress_bar_bg_light); + ((ProgressBar) mainView.findViewById(R.id.progress_bar)).setProgressDrawable(AndroidUtils + .createProgressDrawable(bgColor, ctx.getMapLayers().getRouteLayer().getRouteLineColor(nightMode))); } public static boolean showInstance(final MapActivity mapActivity) {