michoprogrammer
michoprogrammer

Reputation: 1199

Android mapviewballoons

I'm using this library https://github.com/jgilfelt/android-mapviewballoons in my android app and it is very useful. Now I'm trying to capture the event when you tap the balloon open. I'd want to launch a new activity after tapping on the text of the balloon open. How can I do it?

Thanks at all

Upvotes: 0

Views: 1034

Answers (2)

v0d1ch
v0d1ch

Reputation: 2748

You are missing context infront of startActivity() method

c.startActivity(to_taghelp);

Upvotes: 1

Matthias Robbers
Matthias Robbers

Reputation: 15738

Check out the demo application of the library. In the simple example, replace

@Override
protected boolean onBalloonTap(int index, OverlayItem item) {
    Toast.makeText(c, "onBalloonTap for overlay index " + index,
    Toast.LENGTH_LONG).show();
    return true;
}

with

@Override
protected boolean onBalloonTap(int index, OverlayItem item) {
    // start your Activity here
    return true;
}

Upvotes: 0

Related Questions