I'm displaying a couple of markers on a Google Map. When I click on a marker it opens a custom InfoWindowAdapter
this.map.setInfoWindowAdapter(new CustomInfoWindowAdapter(getLayoutInflater()));
In this CustomInfoWindowAdapter I display some text and create a link when a phone number is found:
@Override
public View getInfoContents(Marker marker) {
if (this.popup == null) {
this.popup = inflater.inflate(R.layout.poi_marker, null);
}
TextView tv = (TextView) popup.findViewById(R.id.title);
tv.setText(marker.getTitle());
tv = (TextView) popup.findViewById(R.id.snippet);
tv.setText(marker.getSnippet());
Linkify.addLinks(tv, Linkify.PHONE_NUMBERS);
return(popup);
}
The display is then correct. I can see that the phone number is displayed as a link, but I cannot press on it... How I can I make it open the dialer ?