diff --git a/OsmAnd/res/layout/animate_route.xml b/OsmAnd/res/layout/animate_route.xml index 4b8260e9bc..5f6a5af164 100644 --- a/OsmAnd/res/layout/animate_route.xml +++ b/OsmAnd/res/layout/animate_route.xml @@ -10,6 +10,7 @@ android:layout_marginLeft="24dp" android:layout_marginTop="16dp" android:layout_marginRight="16dp" + android:textColor="?android:attr/textColorSecondary" android:layout_marginBottom="8dp" android:text="@string/animate_routing_gpx" /> @@ -25,6 +26,7 @@ android:layout_marginLeft="24dp" android:layout_marginTop="5dp" android:layout_marginRight="16dp" + android:textColor="?android:attr/textColorSecondary" android:gravity="left" android:text="@string/select_animate_speedup" /> @@ -47,6 +49,7 @@ android:id="@+id/MinSpeedup" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:textColor="?android:attr/textColorSecondary" android:layout_weight="0.5" android:gravity="left" android:text="10" /> @@ -55,6 +58,7 @@ android:id="@+id/MaxSpeedup" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:textColor="?android:attr/textColorSecondary" android:layout_weight="0.5" android:gravity="right" android:text="15" /> diff --git a/OsmAnd/src/net/osmand/plus/OsmAndLocationSimulation.java b/OsmAnd/src/net/osmand/plus/OsmAndLocationSimulation.java index 333f3d622c..7880b29d2e 100644 --- a/OsmAnd/src/net/osmand/plus/OsmAndLocationSimulation.java +++ b/OsmAnd/src/net/osmand/plus/OsmAndLocationSimulation.java @@ -4,11 +4,8 @@ package net.osmand.plus; import android.app.Activity; import android.content.DialogInterface; import android.support.v7.app.AlertDialog; +import android.support.v7.view.ContextThemeWrapper; import android.view.View; -import android.widget.CompoundButton; -import android.widget.CompoundButton.OnCheckedChangeListener; -import android.widget.LinearLayout; -import android.widget.RadioButton; import android.widget.SeekBar; import android.widget.TextView; import android.widget.Toast; @@ -55,7 +52,9 @@ public class OsmAndLocationSimulation { public void startStopRouteAnimation(final Activity ma, boolean useGpx, final Runnable runnable) { if (!isRouteAnimating()) { if (useGpx) { - AlertDialog.Builder builder = new AlertDialog.Builder(ma); + boolean nightMode = app.getDaynightHelper().isNightModeForMapControls(); + int themeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme; + AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(ma, themeRes)); builder.setTitle(R.string.animate_route); final View view = ma.getLayoutInflater().inflate(R.layout.animate_route, null); @@ -63,6 +62,7 @@ public class OsmAndLocationSimulation { ((TextView) view.findViewById(R.id.MaxSpeedup)).setText("4"); //$NON-NLS-1$ final SeekBar speedup = (SeekBar) view.findViewById(R.id.Speedup); speedup.setMax(3); + UiUtilities.setupSeekBar(app, speedup, nightMode, true); builder.setView(view); builder.setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() { diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java index 1738681792..82a88dd42f 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java @@ -466,12 +466,15 @@ public class OsmandMonitoringPlugin extends OsmandPlugin { final int[] minutes, final ValueHolder choice, final ValueHolder v, final boolean showTrackSelection, boolean nightMode) { + int textColorPrimary = ContextCompat.getColor(app, nightMode ? R.color.text_color_primary_dark : R.color.text_color_primary_light); + int textColorSecondary = ContextCompat.getColor(app, nightMode ? R.color.text_color_secondary_dark : R.color.text_color_secondary_light); LinearLayout ll = new LinearLayout(uiCtx); final int dp24 = AndroidUtils.dpToPx(uiCtx, 24f); final int dp8 = AndroidUtils.dpToPx(uiCtx, 8f); final TextView tv = new TextView(uiCtx); tv.setPadding(dp24, dp8 * 2, dp24, dp8); tv.setText(String.format(patternMsg, uiCtx.getString(R.string.int_continuosly))); + tv.setTextColor(textColorSecondary); SeekBar sp = new SeekBar(uiCtx); sp.setPadding(dp24 + dp8, dp8, dp24 + dp8, dp8); @@ -524,7 +527,6 @@ public class OsmandMonitoringPlugin extends OsmandPlugin { ll.setOrientation(LinearLayout.VERTICAL); ll.addView(tv); ll.addView(sp); - int textColorPrimary = ContextCompat.getColor(app, nightMode ? R.color.text_color_primary_dark : R.color.text_color_primary_light); if (choice != null) { final AppCompatCheckBox cb = new AppCompatCheckBox(uiCtx); cb.setText(R.string.shared_string_remember_my_choice);