Ad

MapView Navigation Movement?

- 1 answer

I am trying to make mapView can be moved when navigation movement (when user click device arrow key left, right, up, down).

How to make it ?

Ad

Answer

All you need to do is add the android:focusable="true" attribute to your MapView in your layout XML. If you're creating your MapView programmatically, you can make it focusable by calling mapView.setFocusable(true). You can also call mapView.requestFocus() if you need to explicitly give the map focus and allow keyboard panning.

You can read more about how the UI framework handles focus in the Developer Guide section on Handling UI Events.

Ad
source: stackoverflow.com
Ad