How to swipe between multiple links in textview using talkback in android?

Viewed 372

I am trying to improve accessibility for a text view used for terms and privacy policy which looks something like this:

enter image description here

As mentioned on the Google Support page, the user will need to access the Local Context Menu via a TalkBack gesture (default gesture is Swipe up then right) to activate a TextView link.

But I want to use a swipe gesture to navigate between links something like: enter image description here

Currently, I am using clickable span to add the links, it is working fine with Local Context Menu but not with a swipe gesture. My code looks something like this:

    val clickableSpan: ClickableSpan = object : ClickableSpan() {
        override fun onClick(widget: View) {
            // handle link click.
        }
    }
    val spannableStringBuilder = SpannableStringBuilder(text).apply {
        setSpan(clickableSpan, 99, 109, Spannable.SPAN_INCLUSIVE_INCLUSIVE)
    }
    tv_term_and_privacy_policy.apply {
        setText(spannableStringBuilder)
        movementMethod = LinkMovementMethod.getInstance()
    }

Please help me with this.

0 Answers
Related