let ThumbnailView handle remove button placement

Closes #3849
// FREEBIE
This commit is contained in:
Jake McGinty
2015-07-30 15:02:20 -07:00
committed by Moxie Marlinspike
parent 835f1efc76
commit 1641fd91cf
8 changed files with 85 additions and 37 deletions

View File

@@ -29,7 +29,6 @@ import android.util.Log;
import android.view.View;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.widget.ImageView;
import android.widget.Toast;
import org.thoughtcrime.securesms.R;
@@ -48,7 +47,6 @@ public class AttachmentManager {
private final Context context;
private final View attachmentView;
private final ThumbnailView thumbnail;
private final ImageView removeButton;
private final SlideDeck slideDeck;
private final AttachmentListener attachmentListener;
@@ -57,12 +55,11 @@ public class AttachmentManager {
public AttachmentManager(Activity view, AttachmentListener listener) {
this.attachmentView = view.findViewById(R.id.attachment_editor);
this.thumbnail = (ThumbnailView)view.findViewById(R.id.attachment_thumbnail);
this.removeButton = (ImageView)view.findViewById(R.id.remove_image_button);
this.slideDeck = new SlideDeck();
this.context = view;
this.attachmentListener = listener;
this.removeButton.setOnClickListener(new RemoveButtonListener());
thumbnail.setRemoveClickListener(new RemoveButtonListener());
}
public void clear() {
@@ -76,7 +73,6 @@ public class AttachmentManager {
attachmentView.setVisibility(View.GONE);
attachmentListener.onAttachmentChanged();
}
});
attachmentView.startAnimation(animation);