Skip to content

Commit ecea70a

Browse files
committed
Add progress indicator when taking a photo
1 parent 5d04527 commit ecea70a

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

vector/src/main/java/im/vector/app/features/attachments/camera/AttachmentsCameraFragment.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ class AttachmentsCameraFragment @Inject constructor(
236236
private fun takePhoto() {
237237
Timber.d("Taking a photo")
238238
context?.let { context ->
239+
views.attachmentsCameraLoading.isVisible = true
239240
// Get a stable reference of the modifiable image capture use case
240241
val imageCapture = imageCapture ?: return
241242

vector/src/main/res/layout/fragment_attachments_camera.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@
99
android:layout_width="match_parent"
1010
android:layout_height="match_parent" />
1111

12+
<com.google.android.material.progressindicator.CircularProgressIndicator
13+
android:id="@+id/attachmentsCameraLoading"
14+
android:layout_width="wrap_content"
15+
android:layout_height="wrap_content"
16+
android:indeterminate="true"
17+
android:visibility="invisible"
18+
app:trackColor="@color/alert_default_icon_color"
19+
app:layout_constraintStart_toStartOf="parent"
20+
app:layout_constraintEnd_toEndOf="parent"
21+
app:layout_constraintTop_toTopOf="parent"
22+
app:layout_constraintBottom_toBottomOf="parent"
23+
/>
24+
1225
<com.google.android.material.floatingactionbutton.FloatingActionButton
1326
android:id="@+id/attachmentsCameraChangeAction"
1427
android:layout_width="wrap_content"

0 commit comments

Comments
 (0)