Skip to content

Commit 0e3a8a1

Browse files
committed
Add progress indicator when taking a photo
1 parent 9945231 commit 0e3a8a1

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
@@ -240,6 +240,7 @@ class AttachmentsCameraFragment :
240240
private fun takePhoto() {
241241
Timber.d("Taking a photo")
242242
context?.let { context ->
243+
views.attachmentsCameraLoading.isVisible = true
243244
// Get a stable reference of the modifiable image capture use case
244245
val imageCapture = imageCapture ?: return
245246

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)