How do I go about to load an image for a marker that is saved on the sdCard as well as the path for the image in SQlite database? I have saved the marker id with the file path, but when tapping on the each marker the same image is shown of the last image taken.
Here is my code i have so far:
\\This is to display the initial image taken by the camera intent
View v = getLayoutInflater().inflate(R.layout.infowindow_layout, null);
ImageView markerIcon = (ImageView) v.findViewById(R.id.marker_icon);
Bitmap bitmap = myMarkersHash.get(marker.getId());
markerIcon.setImageBitmap(bitmap);
\\This is to display the loaded image for that marker when tapping on it.
ImageView markerIcon1 = (ImageView) v.findViewById(R.id.marker_icon);
Bitmap myImage = BitmapFactory.decodeFile(filep);
markerIcon1.setImageBitmap(myImage);
I think i need to somehow tell it to load the read the ID for that marker as well, but not sure how to do that?
Can any one please help?
EDIT
Sorry forgot to mention, both these codes are in the getInfoContents(Marker marker)
method
Aucun commentaire:
Enregistrer un commentaire