Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in-app camera #6763

Open
wants to merge 35 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
51b905f
Add VideoCamera button for attachment
p1gp1g Jul 28, 2022
59546b0
Add internal Camera : take photo
p1gp1g Jul 30, 2022
8fcc9c2
Add internal Camera : record video
p1gp1g Aug 2, 2022
59e0c1e
Create tempfile in the fragment
p1gp1g Aug 2, 2022
6b4fef9
Change capture mode in camera view
p1gp1g Aug 5, 2022
764ef53
Change camera in camera view
p1gp1g Aug 5, 2022
a215fe2
Restore capture mode in camera view
p1gp1g Aug 5, 2022
e916709
Add gesture to zoom in camera view
p1gp1g Aug 5, 2022
f56a8fe
Remove intent action for camera activity
p1gp1g Aug 5, 2022
90e922b
Set the built-in camera as a lab preference
p1gp1g Aug 7, 2022
d534a7d
Control flash in camera view
p1gp1g Aug 7, 2022
9945231
Lint
p1gp1g Aug 7, 2022
0e3a8a1
Add progress indicator when taking a photo
p1gp1g Aug 7, 2022
8236a32
Add changelog detail
p1gp1g Aug 7, 2022
4856fc6
Add support for orientation
p1gp1g Aug 27, 2022
ec1e5e2
Camera: Follow the MVI pattern
p1gp1g Aug 29, 2022
3776305
Camera: Add UI tests
p1gp1g Aug 29, 2022
9bca9bd
Do not use "VectorCamera" for names
p1gp1g Aug 29, 2022
bbdfa6e
Fix dependencies.gradle for androidx.camera
p1gp1g Aug 29, 2022
08ae120
Enable orientationEventListener onStart
p1gp1g Sep 5, 2022
db5e582
Lint
p1gp1g Sep 5, 2022
d88371d
Add chronometer to camera view
p1gp1g Sep 5, 2022
ccf0c88
Use new UX for the camera
p1gp1g Sep 5, 2022
916cc2e
Import drawable and fix colors
p1gp1g Sep 5, 2022
772e97b
Fix UI test for the video camera
p1gp1g Sep 6, 2022
8cad95d
Better style/UX
p1gp1g Sep 6, 2022
23fa3c9
Use OnImageCapturedCallback to improve latency
p1gp1g Sep 6, 2022
d5039dc
Fix UI tests for the camera
p1gp1g Sep 6, 2022
d43b144
Add Camera Action description
p1gp1g Sep 6, 2022
64f3b2e
Fix chronometer visibility
p1gp1g Sep 12, 2022
4eac12d
Change text size and chrono margin
p1gp1g Sep 12, 2022
8114f5b
Use recording and done states
p1gp1g Sep 17, 2022
a28fb0d
Revert "Add VideoCamera button for attachment"
p1gp1g Sep 17, 2022
a5d87e6
Use common icon to flip camera
p1gp1g Sep 18, 2022
ae2a920
Fix image rotation
p1gp1g Oct 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Import drawable and fix colors
p1gp1g committed Sep 5, 2022
commit 916cc2ec4229c8fc494aadf3338d23f4a76c0367
Original file line number Diff line number Diff line change
@@ -117,7 +117,7 @@ class AttachmentsCameraFragment :
when (it) {
AttachmentsCameraViewEvents.StartRecording -> {
views.attachmentsCameraCaptureAction.setImageDrawable(
context?.getDrawable(R.drawable.ic_video_off)
context?.getDrawable(R.drawable.ic_material_stop)
)
views.attachmentsCameraFlip.isEnabled = false
views.attachmentsCameraFlash.isEnabled = false
5 changes: 5 additions & 0 deletions vector/src/main/res/drawable/ic_material_record.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,12m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"/>
</vector>
5 changes: 5 additions & 0 deletions vector/src/main/res/drawable/ic_material_stop.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M6,6h12v12H6z"/>
</vector>
12 changes: 7 additions & 5 deletions vector/src/main/res/layout/fragment_attachments_camera.xml
Original file line number Diff line number Diff line change
@@ -15,7 +15,8 @@
android:layout_height="wrap_content"
android:indeterminate="true"
android:visibility="invisible"
app:trackColor="@color/alert_default_icon_color"
app:trackColor="?colorBackgroundFloating"
app:indicatorColor="?colorPrimary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
@@ -42,12 +43,13 @@
android:layout_height="wrap_content"
android:layout_marginBottom="50dp"
android:elevation="2dp"
android:scaleX="1.3"
android:scaleY="1.3"
android:src="@drawable/bg_rounded_button"
android:scaleX="1.7"
android:scaleY="1.7"
android:src="@drawable/ic_material_record"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:fabSize="mini"
android:contentDescription="@string/attachment_camera_capture" />

<com.google.android.material.floatingactionbutton.FloatingActionButton
@@ -68,7 +70,7 @@
android:id="@+id/attachmentsCameraChronometer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/button_background_tint_selector"
android:textColor="?colorPrimary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/attachmentsCameraCaptureAction"