我正在使用以下代码在地图中打开一个信息窗口:
//定义弹出窗口
private View popup = null;
mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter(){
@Override
public View getInfoWindow(Marker marker) {
return null;
}
@Override
public View getInfoContents(final Marker marker) {
if(popup == null){
popup = getLayoutInflater().inflate(R.layout.custom_adress,null);
}
final ImageView customadresimage = (ImageView) popup.findViewById(R.id.customadresimage); //my imageview
Picasso.get().load(marker.getSnippet()).resize(200,200).into(customadresimage); //save and show photo from firebase
return popup;
}
});
当我单击图钉时,首先不显示照片,而当我单击图钉时,显示照片。