This commit is contained in:
Alex Sytnyk 2018-05-31 20:14:15 +03:00
parent 3d029754ed
commit 5527e3ff52
3 changed files with 8 additions and 4 deletions

View file

@ -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" />

View file

@ -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" />

View file

@ -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) {