1

I want to replicate this great iOS library (SMCalloutView) on Android?

In it's example, a marker (pin on iOS) is created and added on a scrollable, zoomable imageView. And when the marker is clicked, an infoWindow (callout view on iOS) is shown. How do I achieve this behaviour? Is there a similar library to this? Should I draw the marker and show info window manually? Is there at least any way to use Marker and it's infoWindow on an ImageView.

SMCalloutView example

osrl
  • 8,168
  • 8
  • 36
  • 57

2 Answers2

2

Best choice I could find is this library It has a pin sample you could use.

Add pin as a bitmap, override add an OnPinClickListener interface (see samples for where to invoke the onPinClick method).

if (pinRect.contains((int)touchCoord.x, (int)touchCoord.y)) {
    onPinClickListener.onPinClicked(i);
}

I still have no answer for info window.

osrl
  • 8,168
  • 8
  • 36
  • 57
  • You should be able to implement the info window as another overlay graphic, perhaps using a 9 patch background. – Dave Morrissey Mar 24 '15 at 23:15
  • Hey, can either osri or Dave please provide an implementation example of OnPinCickListener showing how to override ? I am in search of this problem too – Ebad Saghar Oct 12 '15 at 02:54
  • 1
    I am looking at the piniew example in the library, but would like a more detailed example of implementing an onPinClick – Ebad Saghar Oct 12 '15 at 03:12
0

sorry, there is no native View with this "pinning" feature as I know, but you might check this library and maybe this stack question

for popup you might use default Android Popup or QuickAction lib (one of two) from here

Community
  • 1
  • 1
snachmsm
  • 17,866
  • 3
  • 32
  • 74