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
  • 10,362
  • 9
  • 56
  • 89

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
  • 2,444
  • 2
  • 11
  • 31