0
GoogleMap.InfoWindowAdapterを実装するクラスを使用しています。ピカソ画像が表示されない
私は情報ウィンドウ内で、インターネットからロードされた画像を表示したい:
@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", "[email protected]");
Log.d("BOTON ORIGEN ","mi imagen "+urlProfileImg+imagen);
Picasso.with(getApplicationContext()).load(urlProfileImg+imagen).fit().into(imgProfile);
return v;
}
私は両方、画像URLとイメージ名をチェックして、どちらも正しいですが、画像が表示されません。
あなたは 'fit()'を削除して試してみることができます。 – KeLiuyue
正しい権限を与えましたか? –