0

I have a scenario in which when talkback is turned on and we open a dialog, there is a recycler view or a list of items in the view, so the voice reads the content along with a count of the item inside the view as we scroll.

Now my question: Is there a way we can give custom content speak to the talkback when there is a scroll happening? Or if not can we disable the talkback on scroll?

I have tried a few solutions from the stack ref one and ref two but both of them did not work.

NOTE: the dialog is created in jetpack compose

@Composable
fun AppCustomDialog(
    viewModel: AppCustomDialogViewModel,
    onCloseRequest: () -> Unit
) {
    AppDialog(
        viewModel = viewModel,
        onCloseRequest = onCloseRequest
    ) { contentViewModel, _ ->

        ViewModelDataBindingView(
            layoutId = contentViewModel.layoutId,
            viewModel = contentViewModel.viewModel,
        )
    }
}
hamza khan
  • 141
  • 1
  • 11
  • It's possible you could use an `AccessibilityDelegateCompat` to intercept `TYPE_VIEW_SCROLLED` `AccessibilityEvent`s and override the default output - but why do you want to do this? *TalkBack* is a utility to help blind and partially sighted people navigate through apps and generally use their phones - it has very specific behaviours, designed to give those users a consistent experience, and enable them to know what's going on. If you start changing how lists work (like disabling speech output entirely) that could be confusing. What's the actual problem you're trying to solve? – cactustictacs Oct 20 '22 at 17:57

0 Answers0