0

当我使用 mapforge API 在屏幕上点击/长按时,我想获取用户位置...

即使我长按屏幕,也不会触发此代码。

     mapView.setOnLongClickListener(new OnLongClickListener() {

     @Override
     public boolean onLongClick(View v) {
     toastLong("onlongclick");
     return false;
     }
     });
4

1 回答 1

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;
        }
    });
于 2013-10-17T07:54:40.110 回答