Add in-app video recording for supported devices.

This commit is contained in:
alex-signal
2019-10-09 17:16:23 -03:00
committed by Greyson Parrelli
parent 43954a176a
commit ff60b5b731
31 changed files with 1873 additions and 90 deletions

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="oval" xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FF261F" />
</shape>

View File

@@ -8,11 +8,12 @@
<org.thoughtcrime.securesms.mediasend.CameraButtonView
android:id="@+id/camera_capture_button"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginEnd="24dp"
android:background="@drawable/ic_camera_shutter"
android:layout_width="96dp"
android:layout_height="96dp"
android:layout_marginEnd="25dp"
android:contentDescription="@string/CameraXFragment_capture_description"
app:imageCaptureSize="60dp"
app:recordSize="42dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>

View File

@@ -8,11 +8,12 @@
<org.thoughtcrime.securesms.mediasend.CameraButtonView
android:id="@+id/camera_capture_button"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginBottom="24dp"
android:background="@drawable/ic_camera_shutter"
android:layout_width="96dp"
android:layout_height="96dp"
android:layout_marginBottom="25dp"
android:contentDescription="@string/CameraXFragment_capture_description"
app:imageCaptureSize="60dp"
app:recordSize="42dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
@@ -41,7 +42,7 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:visibility="visible" />
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/camera_gallery_button"
android:layout_width="36dp"

View File

@@ -6,6 +6,7 @@
<org.thoughtcrime.securesms.mediasend.camerax.CameraXView
android:id="@+id/camerax_camera"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="match_parent" />

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.video.VideoPlayer
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/grey_400_transparent"
android:layout_width="match_parent"
android:layout_height="match_parent">

View File

@@ -85,6 +85,8 @@
<attr name="emoji_category_emoticons" format="reference"/>
<attr name="emoji_variation_selector_background" format="reference|color" />
<attr name="camera_button_style" />
<attr name="quick_camera_icon" format="reference"/>
<attr name="quick_mic_icon" format="reference"/>

View File

@@ -96,6 +96,7 @@
<string name="CameraActivity_image_save_failure">Failed to save image.</string>
<!-- CameraXFragment -->
<string name="CameraXFragment_video_recording_available">Tap to take a picture, or keep your finger on the capture button to record a video.</string>
<string name="CameraXFragment_capture_description">Capture</string>
<string name="CameraXFragment_change_camera_description">Change camera</string>
<string name="CameraXFragment_open_gallery_description">Open gallery</string>
@@ -1344,6 +1345,7 @@
<string name="preferences__linked_devices">Linked devices</string>
<string name="preferences__light_theme">Light</string>
<string name="preferences__dark_theme">Dark</string>
<string name="preferences__system_theme">System</string>
<string name="preferences__appearance">Appearance</string>
<string name="preferences__theme">Theme</string>
<string name="preferences__default">Default</string>

View File

@@ -340,4 +340,9 @@
<item name="titleTextStyle">@style/TextSecure.TitleTextStyle.Conversation</item>
</style>
<declare-styleable name="CameraButtonView">
<attr name="imageCaptureSize" format="dimension" />
<attr name="recordSize" format="dimension" />
</declare-styleable>
</resources>