I am using a Class that implements GoogleMap.InfoWindowAdapter.
I want to show an image loaded from internet inside the info window:
@Override
public View getInfoContents(final Marker m) {
//Carga layout personalizado.
View v = inflater.inflate(R.layout.info_windows_origen, null);
String info = m.getTitle();
String direccion = m.getSnippet();
String url = m.getSnippet();
((TextView)v.findViewById(R.id.info_window_nombre)).setText("PUNTO DE PARTIDA");
((TextView)v.findViewById(R.id.info_window_placas)).setText(info);
((TextView)v.findViewById(R.id.info_window_estado)).setText(direccion);
ImageView imgProfile =(ImageView)v.findViewById(R.id.info_window_imagen);
SharedPreferences prefs =
getApplicationContext().getSharedPreferences(MISDATOS, Context.MODE_PRIVATE);
String imagen = prefs.getString("imagen", "por_defecto@email.com");
Log.d("BOTON ORIGEN ","mi imagen "+urlProfileImg+imagen);
Picasso.with(getApplicationContext()).load(urlProfileImg+imagen).fit().into(imgProfile);
return v;
}
I have checked both, the image URL and the image name, and both are correct, but the image is not shown.
Be sure you have internet permission in the manifest. Try removing fit Posting the url you are providing would be easier to work with