From c7599094f5dbcbd4ba43c24e8d0cdd7e98e0c628 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Mon, 13 Jul 2015 13:26:06 -0700 Subject: [PATCH] hide controls when camera drawer isn't open Closes #3654 // FREEBIE --- res/layout/quick_attachment_drawer.xml | 3 ++- .../securesms/components/camera/QuickAttachmentDrawer.java | 5 +++++ .../securesms/components/camera/QuickCamera.java | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/res/layout/quick_attachment_drawer.xml b/res/layout/quick_attachment_drawer.xml index b7c83a72fc..717fb1720d 100644 --- a/res/layout/quick_attachment_drawer.xml +++ b/res/layout/quick_attachment_drawer.xml @@ -4,6 +4,7 @@ + android:layout_height="match_parent" + android:visibility="gone" /> \ No newline at end of file diff --git a/src/org/thoughtcrime/securesms/components/camera/QuickAttachmentDrawer.java b/src/org/thoughtcrime/securesms/components/camera/QuickAttachmentDrawer.java index 0b34bd4f21..eb44396473 100644 --- a/src/org/thoughtcrime/securesms/components/camera/QuickAttachmentDrawer.java +++ b/src/org/thoughtcrime/securesms/components/camera/QuickAttachmentDrawer.java @@ -128,6 +128,7 @@ public class QuickAttachmentDrawer extends ViewGroup { } shutterButton.setOnClickListener(new ShutterClickListener()); fullScreenButton.setOnClickListener(new FullscreenClickListener()); + controls.setVisibility(GONE); addView(controls, controlsIndex > -1 ? controlsIndex : indexOfChild(quickCamera) + 1); } @@ -273,8 +274,12 @@ public class QuickAttachmentDrawer extends ViewGroup { } if (slideOffset == COLLAPSED_ANCHOR_POINT && quickCamera.isStarted()) { + controls.setVisibility(GONE); + quickCamera.setVisibility(GONE); quickCamera.onPause(); } else if (slideOffset != COLLAPSED_ANCHOR_POINT && !quickCamera.isStarted()) { + controls.setVisibility(VISIBLE); + quickCamera.setVisibility(VISIBLE); quickCamera.onResume(); } } diff --git a/src/org/thoughtcrime/securesms/components/camera/QuickCamera.java b/src/org/thoughtcrime/securesms/components/camera/QuickCamera.java index dbcf0032d7..4eba2df59a 100644 --- a/src/org/thoughtcrime/securesms/components/camera/QuickCamera.java +++ b/src/org/thoughtcrime/securesms/components/camera/QuickCamera.java @@ -43,7 +43,6 @@ import java.util.List; super(context, attrs, defStyle); cameraHost = new QuickCameraHost(context); setHost(cameraHost); - setClickable(false); } @Override