mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-04-30 05:54:26 +02:00
fix: ExtendedFloatingActionButton
not accessible by screen readers (#2080)
This commit is contained in:
parent
c18901c35b
commit
4257c32bf5
@ -570,7 +570,12 @@ private class ListOptionEditor<T : Serializable>(private val elementEditor: Opti
|
|||||||
|
|
||||||
ExtendedFloatingActionButton(
|
ExtendedFloatingActionButton(
|
||||||
text = { Text(stringResource(R.string.add)) },
|
text = { Text(stringResource(R.string.add)) },
|
||||||
icon = { Icon(Icons.Outlined.Add, null) },
|
icon = {
|
||||||
|
Icon(
|
||||||
|
Icons.Outlined.Add,
|
||||||
|
stringResource(R.string.add)
|
||||||
|
)
|
||||||
|
},
|
||||||
expanded = lazyListState.isScrollingUp,
|
expanded = lazyListState.isScrollingUp,
|
||||||
onClick = { items.add(Item(null)) }
|
onClick = { items.add(Item(null)) }
|
||||||
)
|
)
|
||||||
|
@ -295,8 +295,14 @@ fun PatchesSelectorScreen(
|
|||||||
|
|
||||||
ExtendedFloatingActionButton(
|
ExtendedFloatingActionButton(
|
||||||
text = { Text(stringResource(R.string.save)) },
|
text = { Text(stringResource(R.string.save)) },
|
||||||
icon = { Icon(Icons.Outlined.Save, null) },
|
icon = {
|
||||||
expanded = patchLazyListStates.getOrNull(pagerState.currentPage)?.isScrollingUp ?: true,
|
Icon(
|
||||||
|
Icons.Outlined.Save,
|
||||||
|
stringResource(R.string.save)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
expanded = patchLazyListStates.getOrNull(pagerState.currentPage)?.isScrollingUp
|
||||||
|
?: true,
|
||||||
onClick = {
|
onClick = {
|
||||||
// TODO: only allow this if all required options have been set.
|
// TODO: only allow this if all required options have been set.
|
||||||
onSave(vm.getCustomSelection(), vm.getOptions())
|
onSave(vm.getCustomSelection(), vm.getOptions())
|
||||||
@ -566,7 +572,13 @@ private fun OptionsDialog(
|
|||||||
if (values == null || !values.contains(key)) option.default else values[key]
|
if (values == null || !values.contains(key)) option.default else values[key]
|
||||||
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
OptionItem(option = option as Option<Any>, value = value, setValue = { set(key, it) })
|
OptionItem(
|
||||||
|
option = option as Option<Any>,
|
||||||
|
value = value,
|
||||||
|
setValue = {
|
||||||
|
set(key, it)
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,12 @@ private fun SelectedAppInfoScreen(
|
|||||||
floatingActionButton = {
|
floatingActionButton = {
|
||||||
ExtendedFloatingActionButton(
|
ExtendedFloatingActionButton(
|
||||||
text = { Text(stringResource(R.string.patch)) },
|
text = { Text(stringResource(R.string.patch)) },
|
||||||
icon = { Icon(Icons.Default.AutoFixHigh, null) },
|
icon = {
|
||||||
|
Icon(
|
||||||
|
Icons.Default.AutoFixHigh,
|
||||||
|
stringResource(R.string.patch)
|
||||||
|
)
|
||||||
|
},
|
||||||
onClick = onPatchClick
|
onClick = onPatchClick
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,12 @@ fun VersionSelectorScreen(
|
|||||||
floatingActionButton = {
|
floatingActionButton = {
|
||||||
ExtendedFloatingActionButton(
|
ExtendedFloatingActionButton(
|
||||||
text = { Text(stringResource(R.string.select_version)) },
|
text = { Text(stringResource(R.string.select_version)) },
|
||||||
icon = { Icon(Icons.Default.Check, null) },
|
icon = {
|
||||||
|
Icon(
|
||||||
|
Icons.Default.Check,
|
||||||
|
stringResource(R.string.select_version)
|
||||||
|
)
|
||||||
|
},
|
||||||
expanded = lazyListState.isScrollingUp,
|
expanded = lazyListState.isScrollingUp,
|
||||||
onClick = { viewModel.selectedVersion?.let(onAppClick) }
|
onClick = { viewModel.selectedVersion?.let(onAppClick) }
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user