Skip to content

Commit bb69122

Browse files
committed
Update observation view after edit
1 parent c68e516 commit bb69122

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mage/src/main/java/mil/nga/giat/mage/observation/ObservationViewActivity.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import android.content.Intent;
66
import android.content.SharedPreferences;
77
import android.os.Bundle;
8-
import android.preference.PreferenceManager;
98
import android.support.design.widget.FloatingActionButton;
109
import android.support.v4.content.ContextCompat;
1110
import android.support.v7.app.AlertDialog;
@@ -41,7 +40,6 @@
4140
import java.util.Date;
4241
import java.util.Locale;
4342
import java.util.Map;
44-
import java.util.TimeZone;
4543

4644
import mil.nga.giat.mage.R;
4745
import mil.nga.giat.mage.form.LayoutBaker;
@@ -253,6 +251,7 @@ public void onClick(View v) {
253251
LatLng location = new LatLng(pointGeo.getY(), pointGeo.getX());
254252
map.moveCamera(CameraUpdateFactory.newLatLngZoom(location, map.getCameraPosition().zoom));
255253
marker.setPosition(location);
254+
marker.setIcon(ObservationBitmapFactory.bitmapDescriptor(this, o));
256255
}
257256
}
258257

@@ -265,10 +264,12 @@ public void onClick(View v) {
265264

266265
LinearLayout galleryLayout = (LinearLayout) findViewById(R.id.image_gallery);
267266
galleryLayout.removeAllViews();
267+
268268
if (o.getAttachments().size() == 0) {
269269
findViewById(R.id.gallery_container).setVisibility(View.GONE);
270270
} else {
271-
attachmentGallery = new AttachmentGallery(getApplicationContext(), 150, 150);
271+
findViewById(R.id.gallery_container).setVisibility(View.VISIBLE);
272+
attachmentGallery = new AttachmentGallery(getApplicationContext(), 150, 150);
272273
attachmentGallery.addOnAttachmentClickListener(new AttachmentGallery.OnAttachmentClickListener() {
273274
@Override
274275
public void onAttachmentClick(Attachment attachment) {

0 commit comments

Comments
 (0)