Add lock control
This commit is contained in:
parent
00d23f7ad4
commit
8a449fb194
7 changed files with 148 additions and 98 deletions
|
@ -9,6 +9,8 @@
|
||||||
1. All your modified/created strings are in the top of the file (to make easier find what's translated).
|
1. All your modified/created strings are in the top of the file (to make easier find what's translated).
|
||||||
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
||||||
-->
|
-->
|
||||||
|
<string name="gps_wakeup_interval">GPS wakeup interval : %s</string>
|
||||||
|
<string name="int_continuosly">Continuously</string>
|
||||||
<string name="screen_is_locked">To unlock screen press lock icon</string>
|
<string name="screen_is_locked">To unlock screen press lock icon</string>
|
||||||
<string name="map_widget_top_text">Street name</string>
|
<string name="map_widget_top_text">Street name</string>
|
||||||
<string name="map_widget_config">Configuration</string>
|
<string name="map_widget_config">Configuration</string>
|
||||||
|
|
|
@ -93,8 +93,17 @@ public class NavigationService extends Service implements LocationListener {
|
||||||
handler = new Handler();
|
handler = new Handler();
|
||||||
settings = ((OsmandApplication) getApplication()).getSettings();
|
settings = ((OsmandApplication) getApplication()).getSettings();
|
||||||
serviceOffInterval = settings.SERVICE_OFF_INTERVAL.get();
|
serviceOffInterval = settings.SERVICE_OFF_INTERVAL.get();
|
||||||
serviceOffProvider = settings.SERVICE_OFF_PROVIDER.get();
|
// use only gps provider
|
||||||
serviceError = settings.SERVICE_OFF_WAIT_INTERVAL.get();
|
serviceOffProvider = LocationManager.GPS_PROVIDER;
|
||||||
|
serviceError = serviceOffInterval / 5;
|
||||||
|
// 1. not more than 12 mins
|
||||||
|
serviceError = Math.min(serviceError, 12 * 60 * 1000);
|
||||||
|
// 2. not less than 30 seconds
|
||||||
|
serviceError = Math.max(serviceError, 30 * 1000);
|
||||||
|
// 3. not more than serviceOffInterval
|
||||||
|
serviceError = Math.min(serviceError, serviceOffInterval);
|
||||||
|
|
||||||
|
|
||||||
savingTrackHelper = ((OsmandApplication) getApplication()).getSavingTrackHelper();
|
savingTrackHelper = ((OsmandApplication) getApplication()).getSavingTrackHelper();
|
||||||
liveMonitoringHelper = ((OsmandApplication) getApplication()).getLiveMonitoringHelper();
|
liveMonitoringHelper = ((OsmandApplication) getApplication()).getLiveMonitoringHelper();
|
||||||
|
|
||||||
|
|
|
@ -1239,9 +1239,6 @@ public class OsmandSettings {
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public static final String SERVICE_OFF_ENABLED = "service_off_enabled"; //$NON-NLS-1$
|
public static final String SERVICE_OFF_ENABLED = "service_off_enabled"; //$NON-NLS-1$
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
|
||||||
public final OsmandPreference<String> SERVICE_OFF_PROVIDER = new StringPreference("service_off_provider", LocationManager.GPS_PROVIDER).makeGlobal();
|
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final OsmandPreference<Integer> SERVICE_OFF_INTERVAL = new IntPreference("service_off_interval",
|
public final OsmandPreference<Integer> SERVICE_OFF_INTERVAL = new IntPreference("service_off_interval",
|
||||||
5 * 60 * 1000).makeGlobal();
|
5 * 60 * 1000).makeGlobal();
|
||||||
|
@ -1249,10 +1246,6 @@ public class OsmandSettings {
|
||||||
public final CommonPreference<Boolean> SHOW_CURRENT_GPX_TRACK =
|
public final CommonPreference<Boolean> SHOW_CURRENT_GPX_TRACK =
|
||||||
new BooleanPreference("show_current_gpx_track", false).makeGlobal().cache();
|
new BooleanPreference("show_current_gpx_track", false).makeGlobal().cache();
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
|
||||||
public final OsmandPreference<Integer> SERVICE_OFF_WAIT_INTERVAL = new IntPreference("service_off_wait_interval",
|
|
||||||
90 * 1000).makeGlobal();
|
|
||||||
|
|
||||||
public final OsmandPreference<String> CONTRIBUTION_INSTALL_APP_DATE = new StringPreference("CONTRIBUTION_INSTALL_APP_DATE", null).makeGlobal();
|
public final OsmandPreference<String> CONTRIBUTION_INSTALL_APP_DATE = new StringPreference("CONTRIBUTION_INSTALL_APP_DATE", null).makeGlobal();
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@ import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.location.LocationManager;
|
|
||||||
import android.preference.CheckBoxPreference;
|
import android.preference.CheckBoxPreference;
|
||||||
import android.preference.Preference;
|
import android.preference.Preference;
|
||||||
import android.preference.Preference.OnPreferenceChangeListener;
|
import android.preference.Preference.OnPreferenceChangeListener;
|
||||||
|
@ -118,14 +117,7 @@ public class OsmandBackgroundServicePlugin extends OsmandPlugin {
|
||||||
routeServiceEnabled.setKey(OsmandSettings.SERVICE_OFF_ENABLED);
|
routeServiceEnabled.setKey(OsmandSettings.SERVICE_OFF_ENABLED);
|
||||||
grp.addPreference(routeServiceEnabled);
|
grp.addPreference(routeServiceEnabled);
|
||||||
|
|
||||||
String[] entries = new String[]{app.getString(R.string.gps_provider), app.getString(R.string.network_provider)};
|
|
||||||
String[] entrieValues = new String[]{LocationManager.GPS_PROVIDER, LocationManager.NETWORK_PROVIDER};
|
|
||||||
grp.addPreference(activity.createListPreference(settings.SERVICE_OFF_PROVIDER, entries, entrieValues,
|
|
||||||
R.string.background_service_provider, R.string.background_service_provider_descr));
|
|
||||||
|
|
||||||
grp.addPreference(activity.createTimeListPreference(settings.SERVICE_OFF_INTERVAL, SECONDS, MINUTES, 1000,
|
grp.addPreference(activity.createTimeListPreference(settings.SERVICE_OFF_INTERVAL, SECONDS, MINUTES, 1000,
|
||||||
R.string.background_service_int, R.string.background_service_int_descr));
|
R.string.background_service_int, R.string.background_service_int_descr));
|
||||||
grp.addPreference(activity.createTimeListPreference(settings.SERVICE_OFF_WAIT_INTERVAL,new int[]{15, 30, 45, 60, 90}, new int[]{2, 3, 5, 10}, 1000,
|
|
||||||
R.string.background_service_wait_int, R.string.background_service_wait_int_descr));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,15 +5,24 @@ import net.londatiga.android.QuickAction;
|
||||||
import net.osmand.access.AccessibleToast;
|
import net.osmand.access.AccessibleToast;
|
||||||
import net.osmand.plus.NavigationService;
|
import net.osmand.plus.NavigationService;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.background.OsmandBackgroundServicePlugin;
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.app.AlertDialog.Builder;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.content.DialogInterface.OnClickListener;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Rect;
|
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.LinearLayout.LayoutParams;
|
import android.widget.LinearLayout.LayoutParams;
|
||||||
|
import android.widget.SeekBar;
|
||||||
|
import android.widget.SeekBar.OnSeekBarChangeListener;
|
||||||
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
public class LockInfoControl {
|
public class LockInfoControl {
|
||||||
|
@ -53,6 +62,41 @@ public class LockInfoControl {
|
||||||
FrameLayout.LayoutParams fparams = new FrameLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT,
|
FrameLayout.LayoutParams fparams = new FrameLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT,
|
||||||
Gravity.CENTER);
|
Gravity.CENTER);
|
||||||
transparentLockView.setLayoutParams(fparams);
|
transparentLockView.setLayoutParams(fparams);
|
||||||
|
transparentLockView.setOnTouchListener(new View.OnTouchListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onTouch(View v, MotionEvent event) {
|
||||||
|
if (event.getAction() == MotionEvent.ACTION_UP) {
|
||||||
|
int[] locs = new int[2];
|
||||||
|
lockView.getLocationOnScreen(locs);
|
||||||
|
int x = (int) event.getX() - locs[0];
|
||||||
|
int y = (int) event.getY() - locs[1];
|
||||||
|
transparentLockView.getLocationOnScreen(locs);
|
||||||
|
x += locs[0];
|
||||||
|
y += locs[1];
|
||||||
|
if(lockView.getWidth() >= x && x >= 0 &&
|
||||||
|
lockView.getHeight() >= y && y >= 0) {
|
||||||
|
showBgServiceQAction(lockView, view);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
blinkIcon();
|
||||||
|
AccessibleToast.makeText(transparentLockView.getContext(), R.string.screen_is_locked, Toast.LENGTH_LONG)
|
||||||
|
.show();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void blinkIcon() {
|
||||||
|
lockView.setBackgroundDrawable(lockDisabled);
|
||||||
|
view.postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
lockView.setBackgroundDrawable(lockEnabled);
|
||||||
|
}
|
||||||
|
}, 300);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
final FrameLayout parent = (FrameLayout) view.getParent();
|
final FrameLayout parent = (FrameLayout) view.getParent();
|
||||||
final ActionItem lockScreenAction = new ActionItem();
|
final ActionItem lockScreenAction = new ActionItem();
|
||||||
|
@ -64,40 +108,6 @@ public class LockInfoControl {
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (!isScreenLocked) {
|
if (!isScreenLocked) {
|
||||||
parent.addView(transparentLockView);
|
parent.addView(transparentLockView);
|
||||||
transparentLockView.setOnTouchListener(new View.OnTouchListener() {
|
|
||||||
@Override
|
|
||||||
public boolean onTouch(View v, MotionEvent event) {
|
|
||||||
if (event.getAction() == MotionEvent.ACTION_UP) {
|
|
||||||
int[] locs = new int[2];
|
|
||||||
lockView.getLocationOnScreen(locs);
|
|
||||||
int x = (int) event.getX() - locs[0];
|
|
||||||
int y = (int) event.getY() - locs[1];
|
|
||||||
transparentLockView.getLocationOnScreen(locs);
|
|
||||||
x += locs[0];
|
|
||||||
y += locs[1];
|
|
||||||
if(lockView.getWidth() >= x && x >= 0 &&
|
|
||||||
lockView.getHeight() >= y && y >= 0) {
|
|
||||||
showBgServiceQAction(lockView, view);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
blinkIcon();
|
|
||||||
AccessibleToast.makeText(transparentLockView.getContext(), R.string.screen_is_locked, Toast.LENGTH_LONG)
|
|
||||||
.show();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void blinkIcon() {
|
|
||||||
lockView.setBackgroundDrawable(lockDisabled);
|
|
||||||
view.postDelayed(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
lockView.setBackgroundDrawable(lockEnabled);
|
|
||||||
}
|
|
||||||
}, 300);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
parent.removeView(transparentLockView);
|
parent.removeView(transparentLockView);
|
||||||
}
|
}
|
||||||
|
@ -117,7 +127,7 @@ public class LockInfoControl {
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
Intent serviceIntent = new Intent(view.getContext(), NavigationService.class);
|
Intent serviceIntent = new Intent(view.getContext(), NavigationService.class);
|
||||||
if (view.getApplication().getNavigationService() == null) {
|
if (view.getApplication().getNavigationService() == null) {
|
||||||
view.getContext().startService(serviceIntent);
|
startBgService(serviceIntent, view);
|
||||||
} else {
|
} else {
|
||||||
view.getContext().stopService(serviceIntent);
|
view.getContext().stopService(serviceIntent);
|
||||||
}
|
}
|
||||||
|
@ -128,47 +138,85 @@ public class LockInfoControl {
|
||||||
bgAction.show();
|
bgAction.show();
|
||||||
|
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
private void createIntervalRadioGrp(final QuickAction mQuickAction, OsmandMapTileView view) {
|
public static class ValueHolder<T> {
|
||||||
final OsmandSettings settings = view.getSettings();
|
public T value;
|
||||||
LayoutInflater inflater = (LayoutInflater) view.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
}
|
||||||
final View bgServiceView = inflater.inflate(R.layout.background_service_int, null);
|
|
||||||
final FrameLayout parent = (FrameLayout) view.getParent();
|
private void showIntervalChooseDialog(final OsmandMapTileView view, final String patternMsg,
|
||||||
FrameLayout.LayoutParams fparams = new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, Gravity.CENTER);
|
String startText, final int[] seconds, final int[] minutes, final ValueHolder<Integer> v, OnClickListener onclick){
|
||||||
fparams.setMargins(0, 30, 0, 30);
|
final Context ctx = view.getContext();
|
||||||
bgServiceView.setLayoutParams(fparams);
|
Builder dlg = new AlertDialog.Builder(view.getContext());
|
||||||
bgServiceView.setPadding(20, 5, 20, 5);
|
dlg.setTitle(startText);
|
||||||
parent.addView(bgServiceView);
|
LinearLayout ll = new LinearLayout(view.getContext());
|
||||||
|
final TextView tv = new TextView(view.getContext());
|
||||||
RadioGroup intRadioGrp = (RadioGroup) bgServiceView.findViewById(R.id.wake_up_int_grp);
|
tv.setPadding(7, 3, 7, 0);
|
||||||
final int secondsLength = OsmandBackgroundServicePlugin.SECONDS.length;
|
tv.setText(String.format(patternMsg, ctx.getString(R.string.int_continuosly)));
|
||||||
final int minutesLength = OsmandBackgroundServicePlugin.MINUTES.length;
|
SeekBar sp = new SeekBar(view.getContext());
|
||||||
final int[] SECONDS = OsmandBackgroundServicePlugin.SECONDS;
|
sp.setPadding(7, 5, 7, 0);
|
||||||
final int[] MINUTES = OsmandBackgroundServicePlugin.MINUTES;
|
final int secondsLength = seconds.length;
|
||||||
|
final int minutesLength = minutes.length;
|
||||||
final RadioButton[] intButtons = new RadioButton[minutesLength + secondsLength];
|
sp.setMax(secondsLength + minutesLength - 1);
|
||||||
for (int i = 0; i < secondsLength; i++) {
|
sp.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
|
||||||
intButtons[i] = new RadioButton(view.getContext());
|
@Override
|
||||||
intButtons[i].setText(SECONDS[i] + " " + view.getContext().getString(R.string.int_seconds));
|
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||||
intButtons[i].setTextColor(Color.BLACK);
|
}
|
||||||
intButtons[i].setId(SECONDS[i] * 1000);
|
@Override
|
||||||
intRadioGrp.addView(intButtons[i]);
|
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||||
}
|
}
|
||||||
for (int i = secondsLength; i < secondsLength + minutesLength; i++) {
|
|
||||||
intButtons[i] = new RadioButton(view.getContext());
|
@Override
|
||||||
intButtons[i].setText(MINUTES[i-secondsLength] + " " + view.getContext().getString(R.string.int_min));
|
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||||
intButtons[i].setTextColor(Color.BLACK);
|
String s;
|
||||||
intButtons[i].setId(MINUTES[i-secondsLength] * 60 * 1000);
|
if(progress == 0) {
|
||||||
intRadioGrp.addView(intButtons[i]);
|
s = ctx.getString(R.string.int_continuosly);
|
||||||
}
|
} else {
|
||||||
|
if(progress < secondsLength) {
|
||||||
intRadioGrp.check(settings.SERVICE_OFF_INTERVAL.get());
|
s = seconds[progress] + ctx.getString(R.string.int_seconds);
|
||||||
intRadioGrp.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
v.value = seconds[progress] * 1000;
|
||||||
@Override
|
} else {
|
||||||
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
s = minutes[progress - secondsLength] + ctx.getString(R.string.int_min);
|
||||||
settings.SERVICE_OFF_INTERVAL.set(checkedId);
|
v.value = minutes[progress - secondsLength] * 60 * 1000;
|
||||||
parent.removeView(bgServiceView);
|
}
|
||||||
}
|
}
|
||||||
|
tv.setText(String.format(patternMsg, s));
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} */
|
|
||||||
|
for(int i=0; i<secondsLength +minutesLength - 1; i++) {
|
||||||
|
if(i < secondsLength) {
|
||||||
|
if(v.value <= seconds[i] * 1000) {
|
||||||
|
sp.setProgress(i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if(v.value <= minutes[i - secondsLength] * 1000 * 60) {
|
||||||
|
sp.setProgress(i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ll.setOrientation(LinearLayout.VERTICAL);
|
||||||
|
ll.addView(tv);
|
||||||
|
ll.addView(sp);
|
||||||
|
dlg.setView(ll);
|
||||||
|
dlg.setPositiveButton(R.string.default_buttons_ok, onclick);
|
||||||
|
dlg.setNegativeButton(R.string.default_buttons_cancel, null);
|
||||||
|
dlg.show();
|
||||||
|
}
|
||||||
|
private void startBgService(final Intent serviceIntent, final OsmandMapTileView view) {
|
||||||
|
final ValueHolder<Integer> v = new ValueHolder<Integer>();
|
||||||
|
v.value = view.getSettings().SERVICE_OFF_INTERVAL.get();
|
||||||
|
showIntervalChooseDialog(view, view.getContext().getString(R.string.gps_wakeup_interval),
|
||||||
|
view.getContext().getString(R.string.bg_service_sleep_mode_on), OsmandBackgroundServicePlugin.SECONDS, OsmandBackgroundServicePlugin.MINUTES,
|
||||||
|
v, new OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
view.getSettings().SERVICE_OFF_INTERVAL.set(v.value);
|
||||||
|
view.getContext().startService(serviceIntent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,6 +71,8 @@ public class MapInfoLayer extends OsmandMapLayer {
|
||||||
private MapInfoControls mapInfoControls;
|
private MapInfoControls mapInfoControls;
|
||||||
private TopTextView topText;
|
private TopTextView topText;
|
||||||
|
|
||||||
|
private LockInfoControl lockInfoControl;
|
||||||
|
|
||||||
public MapInfoLayer(MapActivity map, RouteLayer layer){
|
public MapInfoLayer(MapActivity map, RouteLayer layer){
|
||||||
this.map = map;
|
this.map = map;
|
||||||
this.routeLayer = layer;
|
this.routeLayer = layer;
|
||||||
|
@ -117,6 +119,7 @@ public class MapInfoLayer extends OsmandMapLayer {
|
||||||
|
|
||||||
|
|
||||||
mapInfoControls = new MapInfoControls(map.getMyApplication().getSettings());
|
mapInfoControls = new MapInfoControls(map.getMyApplication().getSettings());
|
||||||
|
lockInfoControl = new LockInfoControl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -136,6 +139,10 @@ public class MapInfoLayer extends OsmandMapLayer {
|
||||||
return paintSubText;
|
return paintSubText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LockInfoControl getLockInfoControl() {
|
||||||
|
return lockInfoControl;
|
||||||
|
}
|
||||||
|
|
||||||
public MapInfoControls getMapInfoControls() {
|
public MapInfoControls getMapInfoControls() {
|
||||||
return mapInfoControls;
|
return mapInfoControls;
|
||||||
}
|
}
|
||||||
|
@ -210,7 +217,6 @@ public class MapInfoLayer extends OsmandMapLayer {
|
||||||
View config = createConfiguration();
|
View config = createConfiguration();
|
||||||
mapInfoControls.registerTopWidget(config, R.drawable.widget_config, R.string.map_widget_config, "config", MapInfoControls.RIGHT_CONTROL, all, 10).required(ApplicationMode.values());
|
mapInfoControls.registerTopWidget(config, R.drawable.widget_config, R.string.map_widget_config, "config", MapInfoControls.RIGHT_CONTROL, all, 10).required(ApplicationMode.values());
|
||||||
|
|
||||||
LockInfoControl lockInfoControl = new LockInfoControl();
|
|
||||||
ImageView bgServiceView = lockInfoControl.createLockScreenWidget(view);
|
ImageView bgServiceView = lockInfoControl.createLockScreenWidget(view);
|
||||||
mapInfoControls.registerTopWidget(bgServiceView, R.drawable.lock_enabled, R.string.bg_service_screen_lock, "bgService", MapInfoControls.LEFT_CONTROL, all, 15);
|
mapInfoControls.registerTopWidget(bgServiceView, R.drawable.lock_enabled, R.string.bg_service_screen_lock, "bgService", MapInfoControls.LEFT_CONTROL, all, 15);
|
||||||
|
|
||||||
|
|
|
@ -198,8 +198,8 @@ public class RouteInfoControls {
|
||||||
// showMiniMap = true;
|
// showMiniMap = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// initial state
|
// initial state
|
||||||
// nextTurnInfo.setVisibility(View.GONE);
|
nextTurnInfo.setVisibility(View.GONE);
|
||||||
return nextTurnInfo;
|
return nextTurnInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue