Camera content descriptions and allow camera capture in talk back.

This commit is contained in:
Alan Evans
2019-07-31 10:08:56 -04:00
committed by Greyson Parrelli
parent af8042c5f4
commit 5a614faee1
10 changed files with 101 additions and 55 deletions

View File

@@ -6,12 +6,13 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
<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:contentDescription="@string/CameraXFragment_capture_description"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
@@ -25,6 +26,7 @@
android:src="@drawable/ic_switch_camera_32"
android:scaleType="fitCenter"
android:background="?selectableItemBackgroundBorderless"
android:contentDescription="@string/CameraXFragment_change_camera_description"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
@@ -35,6 +37,7 @@
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginBottom="42dp"
android:contentDescription="@string/CameraXFragment_open_gallery_description"
android:scaleType="centerCrop"
app:layout_constraintBottom_toTopOf="@id/camera_capture_button"
app:layout_constraintStart_toStartOf="@id/camera_capture_button"

View File

@@ -6,12 +6,13 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
<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:contentDescription="@string/CameraXFragment_capture_description"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
@@ -25,6 +26,7 @@
android:src="@drawable/ic_switch_camera_32"
android:scaleType="fitCenter"
android:background="?selectableItemBackgroundBorderless"
android:contentDescription="@string/CameraXFragment_change_camera_description"
android:visibility="gone"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@@ -35,6 +37,7 @@
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginStart="32dp"
android:contentDescription="@string/CameraXFragment_open_gallery_description"
android:scaleType="centerCrop"
app:layout_constraintTop_toTopOf="@id/camera_capture_button"
app:layout_constraintBottom_toBottomOf="@id/camera_capture_button"

View File

@@ -75,6 +75,7 @@
android:layout_gravity="bottom|end"
android:layout_marginEnd="16dp"
android:layout_marginBottom="88dp"
android:contentDescription="@string/conversation_list_fragment__open_camera_description"
android:src="@drawable/ic_camera_filled_24"
android:tint="?conversation_list_camera_icon_tint"
android:focusable="true"

View File

@@ -142,6 +142,7 @@
android:layout_gravity="bottom|end"
android:padding="6dp"
android:background="@drawable/media_continue_button_background"
android:contentDescription="@string/MediaSendActivity_select_recipients_description"
android:visibility="gone"
app:srcCompat="@drawable/ic_continue_24"
tools:visibility="visible"/>