Sebastian
Sebastian

Reputation: 87

How to disable the default closing behaviour from infoWindow in OsmBonusPack?

By default the OsmBonusPack infoWindow bubble closes when I tab the bubble.

How can I disable the default closing behaviour?

Upvotes: 2

Views: 540

Answers (1)

MKer
MKer

Reputation: 3450

Create your own InfoWindow:

MarkerInfoWindow myInfoWindow = new MarkerInfoWindow(layoutResId, map);

Set to its view the TouchListener you want. For instance, to do nothing:

View v = myInfoWindow.getView();
v.setOnTouchListener(new View.OnTouchListener() {
    @Override public boolean onTouch(View v, MotionEvent e) {
        return false;
    }
});

Then give this infoWindow to all your markers:

myMarker.setInfoWindow(myInfoWindow);

Upvotes: 2

Related Questions