Skip to content

Instantly share code, notes, and snippets.

@selmanon
Created September 2, 2014 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save selmanon/1c944ec5d35712298232 to your computer and use it in GitHub Desktop.
Save selmanon/1c944ec5d35712298232 to your computer and use it in GitHub Desktop.
public class CustomInfoWindowAdpater implements GoogleMap.InfoWindowAdapter {
private final View view;
public CustomInfoWindowAdpater() {
view = getLayoutInflater()
.inflate(R.layout.custominfowindow, null);
}
public View getInfoWindow(Marker marker) {
final LinearLayout linearLayout = (LinearLayout)view.findViewById(R.id.ll_custominfowindow);
linearLayout.setTag(marker.getId());
final String profilName = marker.getTitle();
linearLayout.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
// open the application
Intent intent = new Intent(GoogleMapFragment.this,SplashScreenAppPro.class);
// SplashScreen
intent.putExtra("id",linearLayout.getTag().toString());
intent.putExtra("nom_profil", profilName);
startActivity(intent);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment