Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私のプロジェクトでは、バージョン 3.0.10 の OSMdroid を使用しています。そして、MapView のスクロールを無効にしたいと考えています。私は試した:
setFocusable(false) setEnabled(false) setClickable(false)
結果のない MapView のメソッド。地図のスクロールを無効にする方法はありますか?
少し早いですがお礼を。
最も簡単な解決策は、サブクラス化MapViewしてオーバーライドすることscrollTo()です。渡された x および y パラメーターで呼び出す代わりにsuper.scrollTo(x,y)、マップを永続的にロックするスクロール値で呼び出します。
MapView
scrollTo()
super.scrollTo(x,y)