commit
0090acf0a3
3 changed files with 12 additions and 6 deletions
|
@ -10,6 +10,7 @@
|
||||||
android:layout_marginLeft="24dp"
|
android:layout_marginLeft="24dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:text="@string/animate_routing_gpx" />
|
android:text="@string/animate_routing_gpx" />
|
||||||
|
|
||||||
|
@ -25,6 +26,7 @@
|
||||||
android:layout_marginLeft="24dp"
|
android:layout_marginLeft="24dp"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:gravity="left"
|
android:gravity="left"
|
||||||
android:text="@string/select_animate_speedup" />
|
android:text="@string/select_animate_speedup" />
|
||||||
|
|
||||||
|
@ -47,6 +49,7 @@
|
||||||
android:id="@+id/MinSpeedup"
|
android:id="@+id/MinSpeedup"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
android:gravity="left"
|
android:gravity="left"
|
||||||
android:text="10" />
|
android:text="10" />
|
||||||
|
@ -55,6 +58,7 @@
|
||||||
android:id="@+id/MaxSpeedup"
|
android:id="@+id/MaxSpeedup"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
android:gravity="right"
|
android:gravity="right"
|
||||||
android:text="15" />
|
android:text="15" />
|
||||||
|
|
|
@ -4,11 +4,8 @@ package net.osmand.plus;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.support.v7.view.ContextThemeWrapper;
|
||||||
import android.view.View;
|
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.SeekBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
@ -55,7 +52,9 @@ public class OsmAndLocationSimulation {
|
||||||
public void startStopRouteAnimation(final Activity ma, boolean useGpx, final Runnable runnable) {
|
public void startStopRouteAnimation(final Activity ma, boolean useGpx, final Runnable runnable) {
|
||||||
if (!isRouteAnimating()) {
|
if (!isRouteAnimating()) {
|
||||||
if (useGpx) {
|
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);
|
builder.setTitle(R.string.animate_route);
|
||||||
|
|
||||||
final View view = ma.getLayoutInflater().inflate(R.layout.animate_route, null);
|
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$
|
((TextView) view.findViewById(R.id.MaxSpeedup)).setText("4"); //$NON-NLS-1$
|
||||||
final SeekBar speedup = (SeekBar) view.findViewById(R.id.Speedup);
|
final SeekBar speedup = (SeekBar) view.findViewById(R.id.Speedup);
|
||||||
speedup.setMax(3);
|
speedup.setMax(3);
|
||||||
|
UiUtilities.setupSeekBar(app, speedup, nightMode, true);
|
||||||
builder.setView(view);
|
builder.setView(view);
|
||||||
builder.setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
|
builder.setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
|
||||||
|
|
||||||
|
|
|
@ -466,12 +466,15 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
||||||
final int[] minutes, final ValueHolder<Boolean> choice,
|
final int[] minutes, final ValueHolder<Boolean> choice,
|
||||||
final ValueHolder<Integer> v,
|
final ValueHolder<Integer> v,
|
||||||
final boolean showTrackSelection, boolean nightMode) {
|
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);
|
LinearLayout ll = new LinearLayout(uiCtx);
|
||||||
final int dp24 = AndroidUtils.dpToPx(uiCtx, 24f);
|
final int dp24 = AndroidUtils.dpToPx(uiCtx, 24f);
|
||||||
final int dp8 = AndroidUtils.dpToPx(uiCtx, 8f);
|
final int dp8 = AndroidUtils.dpToPx(uiCtx, 8f);
|
||||||
final TextView tv = new TextView(uiCtx);
|
final TextView tv = new TextView(uiCtx);
|
||||||
tv.setPadding(dp24, dp8 * 2, dp24, dp8);
|
tv.setPadding(dp24, dp8 * 2, dp24, dp8);
|
||||||
tv.setText(String.format(patternMsg, uiCtx.getString(R.string.int_continuosly)));
|
tv.setText(String.format(patternMsg, uiCtx.getString(R.string.int_continuosly)));
|
||||||
|
tv.setTextColor(textColorSecondary);
|
||||||
|
|
||||||
SeekBar sp = new SeekBar(uiCtx);
|
SeekBar sp = new SeekBar(uiCtx);
|
||||||
sp.setPadding(dp24 + dp8, dp8, dp24 + dp8, dp8);
|
sp.setPadding(dp24 + dp8, dp8, dp24 + dp8, dp8);
|
||||||
|
@ -524,7 +527,6 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
||||||
ll.setOrientation(LinearLayout.VERTICAL);
|
ll.setOrientation(LinearLayout.VERTICAL);
|
||||||
ll.addView(tv);
|
ll.addView(tv);
|
||||||
ll.addView(sp);
|
ll.addView(sp);
|
||||||
int textColorPrimary = ContextCompat.getColor(app, nightMode ? R.color.text_color_primary_dark : R.color.text_color_primary_light);
|
|
||||||
if (choice != null) {
|
if (choice != null) {
|
||||||
final AppCompatCheckBox cb = new AppCompatCheckBox(uiCtx);
|
final AppCompatCheckBox cb = new AppCompatCheckBox(uiCtx);
|
||||||
cb.setText(R.string.shared_string_remember_my_choice);
|
cb.setText(R.string.shared_string_remember_my_choice);
|
||||||
|
|
Loading…
Reference in a new issue