Piyush
Piyush

Reputation: 2609

How to Start new Activity on overlay item Tap in map?

i have create map in app. i want to show check-ins in it. i am able to display Drawable in overlay item. but i want to start new Activity onTap that overlay item. is it possible?

Thank you... in advance....

Upvotes: 0

Views: 1282

Answers (2)

Vineet Shukla
Vineet Shukla

Reputation: 24031

Yes it is possible.

You have to override the below method where you have extended the ItemizedOverlay<OverlayItem>

@Override
protected final boolean onTap(int index) {
    //Do you job here.
}

Note: While starting activity you should have proper context.

Upvotes: 2

kannappan
kannappan

Reputation: 2250

@Override
protected final boolean onTap(int index) {
         //Do you job here.
       startActivity(new Intent(ur_map_activity.this,SecondActivity.class));

}

Upvotes: 2

Related Questions