hide controls when camera drawer isn't open

Closes #3654
// FREEBIE
This commit is contained in:
Jake McGinty 2015-07-13 13:26:06 -07:00 committed by Moxie Marlinspike
parent 8c63211aaf
commit c7599094f5
3 changed files with 7 additions and 2 deletions

View File

@ -4,6 +4,7 @@
<org.thoughtcrime.securesms.components.camera.QuickCamera
android:id="@+id/quick_camera"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:visibility="gone" />
</merge>

View File

@ -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();
}
}

View File

@ -43,7 +43,6 @@ import java.util.List;
super(context, attrs, defStyle);
cameraHost = new QuickCameraHost(context);
setHost(cameraHost);
setClickable(false);
}
@Override