我希望在使用mapforge API点击/长按屏幕时获取用户位置...
即使我长按屏幕,也不会触发此代码。
mapView.setOnLongClickListener(new OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
toastLong("onlongclick");
return false;
}
});
答案 0 :(得分:0)
使用小修改
mapView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
// TODO Auto-generated method stub
Toast.makeText(getBaseContext(), "Long Clicked is working ", Toast.LENGTH_SHORT).show();
return true;
}
});