[storage] Make backup content selection work better with screen readers

This commit is contained in:
Torsten Grote 2022-06-23 11:43:25 -03:00 committed by Chirayu Desai
parent 49c9425166
commit b856782d33
4 changed files with 8 additions and 2 deletions

View file

@ -57,9 +57,9 @@ public abstract class BackupContentFragment : Fragment(), ContentClickListener {
val adapter = BackupContentAdapter(this)
list.adapter = adapter
viewModel.content.observe(viewLifecycleOwner, {
viewModel.content.observe(viewLifecycleOwner) {
adapter.setItems(it)
})
}
v.findViewById<FloatingActionButton>(R.id.fab).setOnClickListener {
addRequest.launch(DocumentsContract.buildRootsUri(EXTERNAL_STORAGE_PROVIDER_AUTHORITY))
}

View file

@ -5,6 +5,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:screenReaderFocusable="true"
app:cardCornerRadius="8dp">
<androidx.constraintlayout.widget.ConstraintLayout
@ -19,6 +20,7 @@
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="8dp"
android:importantForAccessibility="no"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
@ -41,6 +43,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/content_options"
android:src="@drawable/ic_more_vert"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -5,6 +5,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:screenReaderFocusable="true"
app:cardCornerRadius="8dp">
<androidx.constraintlayout.widget.ConstraintLayout
@ -19,6 +20,7 @@
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="8dp"
android:importantForAccessibility="no"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"

View file

@ -3,6 +3,7 @@
<string name="content_videos">Videos</string>
<string name="content_audio">Audio files</string>
<string name="content_downloads">Downloads</string>
<string name="content_options">Options</string>
<string name="content_add">Add</string>
<string name="notification_backup_title">Storage backup</string>