Skip to content

Commit

Permalink
Disabled default OSMDroid zoom buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
miltonials committed Dec 17, 2024
1 parent 1d745eb commit bea35b0
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.osmdroid.config.Configuration;
import org.osmdroid.tileprovider.tilesource.TileSourceFactory;
import org.osmdroid.util.GeoPoint;
import org.osmdroid.views.CustomZoomButtonsController;
import org.osmdroid.views.MapView;
import org.osmdroid.views.overlay.Polyline;
import org.osmdroid.views.overlay.ScaleBarOverlay;
Expand Down Expand Up @@ -171,6 +172,7 @@ public void onCreate(Bundle savedInstanceState) {
osmView = findViewById(R.id.displaytrackmap_osmView);
// pinch to zoom
osmView.setMultiTouchControls(true);
osmView.getZoomController().setVisibility(CustomZoomButtonsController.Visibility.NEVER);
// we'll use osmView to define if the screen is always on or not
osmView.setKeepScreenOn(prefs.getBoolean(OSMTracker.Preferences.KEY_UI_DISPLAY_KEEP_ON, OSMTracker.Preferences.VAL_UI_DISPLAY_KEEP_ON));
osmViewController = osmView.getController();
Expand Down

0 comments on commit bea35b0

Please sign in to comment.