0

I have a long scroll text in a text view I get from a text file and I want to create a menu that enables you to jump to a specific point in the text. I tried to set HTML href anchor links in the text file but it didn't work.

txtView.setText(Html.fromHtml(byteArrayOutputStream.toString()));

How do I create a menu of text paragraphs of a text view?

leonheess
  • 16,068
  • 14
  • 77
  • 112

1 Answers1

0

You could put the paragraphs in a RecyclerView and then use linearLayoutManager.scrollToPositionWithOffset(position, 0) to scroll the RecyclerView to the chosen paragraph.

Gavin Wright
  • 3,124
  • 3
  • 14
  • 35