diff --git a/res/layout/mediasend_fragment.xml b/res/layout/mediasend_fragment.xml
index fd15041ea9..7f05206915 100644
--- a/res/layout/mediasend_fragment.xml
+++ b/res/layout/mediasend_fragment.xml
@@ -153,4 +153,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/org/thoughtcrime/securesms/mediasend/MediaSendFragment.java b/src/org/thoughtcrime/securesms/mediasend/MediaSendFragment.java
index a563f3546f..73d8468724 100644
--- a/src/org/thoughtcrime/securesms/mediasend/MediaSendFragment.java
+++ b/src/org/thoughtcrime/securesms/mediasend/MediaSendFragment.java
@@ -91,6 +91,7 @@ public class MediaSendFragment extends Fragment implements ViewTreeObserver.OnGl
private Stub emojiDrawer;
private ViewGroup playbackControlsContainer;
private TextView charactersLeft;
+ private View closeButton;
private ControllableViewPager fragmentPager;
private MediaSendFragmentPagerAdapter fragmentPagerAdapter;
@@ -154,6 +155,7 @@ public class MediaSendFragment extends Fragment implements ViewTreeObserver.OnGl
mediaRail = view.findViewById(R.id.mediasend_media_rail);
playbackControlsContainer = view.findViewById(R.id.mediasend_playback_controls_container);
charactersLeft = view.findViewById(R.id.mediasend_characters_left);
+ closeButton = view.findViewById(R.id.mediasend_close_button);
View sendButtonBkg = view.findViewById(R.id.mediasend_send_button_bkg);
@@ -227,6 +229,8 @@ public class MediaSendFragment extends Fragment implements ViewTreeObserver.OnGl
} else {
emojiToggle.setOnClickListener(this::onEmojiToggleClicked);
}
+
+ closeButton.setOnClickListener(v -> requireActivity().onBackPressed());
}
@Override