diff --git a/res/drawable-hdpi/ic_keyboard_arrow_down_white_36dp.png b/res/drawable-hdpi/ic_keyboard_arrow_down_white_36dp.png
new file mode 100644
index 0000000000..4afedf38f5
Binary files /dev/null and b/res/drawable-hdpi/ic_keyboard_arrow_down_white_36dp.png differ
diff --git a/res/drawable-mdpi/ic_keyboard_arrow_down_white_36dp.png b/res/drawable-mdpi/ic_keyboard_arrow_down_white_36dp.png
new file mode 100644
index 0000000000..0c31a0a4c3
Binary files /dev/null and b/res/drawable-mdpi/ic_keyboard_arrow_down_white_36dp.png differ
diff --git a/res/drawable-xhdpi/ic_keyboard_arrow_down_white_36dp.png b/res/drawable-xhdpi/ic_keyboard_arrow_down_white_36dp.png
new file mode 100644
index 0000000000..55880b3d66
Binary files /dev/null and b/res/drawable-xhdpi/ic_keyboard_arrow_down_white_36dp.png differ
diff --git a/res/drawable-xxhdpi/ic_keyboard_arrow_down_white_36dp.png b/res/drawable-xxhdpi/ic_keyboard_arrow_down_white_36dp.png
new file mode 100644
index 0000000000..b97ab9aa67
Binary files /dev/null and b/res/drawable-xxhdpi/ic_keyboard_arrow_down_white_36dp.png differ
diff --git a/res/drawable-xxxhdpi/ic_keyboard_arrow_down_white_36dp.png b/res/drawable-xxxhdpi/ic_keyboard_arrow_down_white_36dp.png
new file mode 100644
index 0000000000..61c9cf6c7d
Binary files /dev/null and b/res/drawable-xxxhdpi/ic_keyboard_arrow_down_white_36dp.png differ
diff --git a/res/layout/attachment_type_selector.xml b/res/layout/attachment_type_selector.xml
index 6caec94a9a..a3780d8894 100644
--- a/res/layout/attachment_type_selector.xml
+++ b/res/layout/attachment_type_selector.xml
@@ -141,8 +141,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
- android:orientation="vertical"
- android:layout_marginLeft="16dp">
+ android:orientation="vertical">
@@ -151,8 +150,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
- android:orientation="vertical"
- android:layout_marginLeft="16dp">
+ android:orientation="vertical">
@@ -160,8 +158,22 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
- android:orientation="vertical"
- android:layout_marginLeft="16dp">
+ android:orientation="vertical">
+
+
+
+
diff --git a/src/org/thoughtcrime/securesms/components/AttachmentTypeSelector.java b/src/org/thoughtcrime/securesms/components/AttachmentTypeSelector.java
index e92b0b2d7b..9415c5c48f 100644
--- a/src/org/thoughtcrime/securesms/components/AttachmentTypeSelector.java
+++ b/src/org/thoughtcrime/securesms/components/AttachmentTypeSelector.java
@@ -43,6 +43,7 @@ public class AttachmentTypeSelector extends PopupWindow {
private final @NonNull ImageView videoButton;
private final @NonNull ImageView contactButton;
private final @NonNull ImageView cameraButton;
+ private final @NonNull ImageView closeButton;
private @Nullable View currentAnchor;
private @Nullable AttachmentClickedListener listener;
@@ -59,12 +60,14 @@ public class AttachmentTypeSelector extends PopupWindow {
this.videoButton = ViewUtil.findById(layout, R.id.video_button);
this.contactButton = ViewUtil.findById(layout, R.id.contact_button);
this.cameraButton = ViewUtil.findById(layout, R.id.camera_button);
+ this.closeButton = ViewUtil.findById(layout, R.id.close_button);
this.imageButton.setOnClickListener(new PropagatingClickListener(ADD_IMAGE));
this.audioButton.setOnClickListener(new PropagatingClickListener(ADD_SOUND));
this.videoButton.setOnClickListener(new PropagatingClickListener(ADD_VIDEO));
this.contactButton.setOnClickListener(new PropagatingClickListener(ADD_CONTACT_INFO));
this.cameraButton.setOnClickListener(new PropagatingClickListener(TAKE_PHOTO));
+ this.closeButton.setOnClickListener(new CloseClickListener());
setContentView(layout);
setWidth(LinearLayout.LayoutParams.MATCH_PARENT);
@@ -102,6 +105,7 @@ public class AttachmentTypeSelector extends PopupWindow {
animateButtonIn(audioButton, ANIMATION_DURATION / 3);
animateButtonIn(videoButton, ANIMATION_DURATION / 4);
animateButtonIn(contactButton, 0);
+ animateButtonIn(closeButton, 0);
}
}
@@ -236,6 +240,13 @@ public class AttachmentTypeSelector extends PopupWindow {
}
+ private class CloseClickListener implements View.OnClickListener {
+ @Override
+ public void onClick(View v) {
+ dismiss();
+ }
+ }
+
public interface AttachmentClickedListener {
public void onClick(int type);
}