毕加索,图片未显示
Picasso, image not shown
我正在使用实现 GoogleMap.InfoWindowAdapter 的 Class。
我想在信息 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;
}
图片URL和图片名称我都检查过了,都是正确的,但是图片没有显示。
确保您在清单中拥有互联网许可。
尝试删除合身
发布您提供的 url 会更容易使用
我正在使用实现 GoogleMap.InfoWindowAdapter 的 Class。
我想在信息 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;
}
图片URL和图片名称我都检查过了,都是正确的,但是图片没有显示。
确保您在清单中拥有互联网许可。 尝试删除合身 发布您提供的 url 会更容易使用