[storage] Make backup content selection work better with screen readers
This commit is contained in:
parent
49c9425166
commit
b856782d33
4 changed files with 8 additions and 2 deletions
|
@ -57,9 +57,9 @@ public abstract class BackupContentFragment : Fragment(), ContentClickListener {
|
||||||
|
|
||||||
val adapter = BackupContentAdapter(this)
|
val adapter = BackupContentAdapter(this)
|
||||||
list.adapter = adapter
|
list.adapter = adapter
|
||||||
viewModel.content.observe(viewLifecycleOwner, {
|
viewModel.content.observe(viewLifecycleOwner) {
|
||||||
adapter.setItems(it)
|
adapter.setItems(it)
|
||||||
})
|
}
|
||||||
v.findViewById<FloatingActionButton>(R.id.fab).setOnClickListener {
|
v.findViewById<FloatingActionButton>(R.id.fab).setOnClickListener {
|
||||||
addRequest.launch(DocumentsContract.buildRootsUri(EXTERNAL_STORAGE_PROVIDER_AUTHORITY))
|
addRequest.launch(DocumentsContract.buildRootsUri(EXTERNAL_STORAGE_PROVIDER_AUTHORITY))
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
|
android:screenReaderFocusable="true"
|
||||||
app:cardCornerRadius="8dp">
|
app:cardCornerRadius="8dp">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
|
android:importantForAccessibility="no"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
@ -41,6 +43,7 @@
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
|
android:contentDescription="@string/content_options"
|
||||||
android:src="@drawable/ic_more_vert"
|
android:src="@drawable/ic_more_vert"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
|
android:screenReaderFocusable="true"
|
||||||
app:cardCornerRadius="8dp">
|
app:cardCornerRadius="8dp">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
|
android:importantForAccessibility="no"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
<string name="content_videos">Videos</string>
|
<string name="content_videos">Videos</string>
|
||||||
<string name="content_audio">Audio files</string>
|
<string name="content_audio">Audio files</string>
|
||||||
<string name="content_downloads">Downloads</string>
|
<string name="content_downloads">Downloads</string>
|
||||||
|
<string name="content_options">Options</string>
|
||||||
<string name="content_add">Add</string>
|
<string name="content_add">Add</string>
|
||||||
|
|
||||||
<string name="notification_backup_title">Storage backup</string>
|
<string name="notification_backup_title">Storage backup</string>
|
||||||
|
|
Loading…
Reference in a new issue