Table of contents with links to text

Hello, I’m developing an app with many big texts (it’s about history), and to make a better navigation in it I’m going to make a tables of contents in the top of the screen, so that I push a button and then it scrolls to the text that is connected with this table of contents.

I had already tried to use hyperlinks with HTML Format so that you push selected text and it scrolls where it should, like that:




but it didn’t worked. How can I make these tables of contents work so that when I push the Button or Label it scrolls to certain part of text it connected with?

Regards, Maxim.

Have you tried doing this in a webviewer?
(I assume you are currently loading your text files into labels ?)

something like this:

anchors.txt (4.0 KB)

(rename to anchors.html)

No, I haven’t, but my programm dedicated to work offline, all the information stored inside the programm and I actually need to navigate in it. As I understand, Webviewer if for online pages only?

Yes my text files are in labels.


you can use files in your assets or on the sdcard

When I open Your file (renamed to ‘aaa.html’) in browser it works fine.
But when I store ‘aaa.html’ in media files and trying to use it in WebViewer as ‘file:///mnt/sdcard/AppInventor/assets/aaa.html’ it doesn’t work.
WebViewer shows ‘aaa.html’ and it looks fine, but when I pressed the ‘menu’ items “what”, “why” etc they hihglights, but text not scroll down to appropriate anchor/topic.

Try this:

anchors.aia (3.7 KB)

could be issue with Android/Webview version ?

Here are a couple of table based text navigation samples … (Needs tweaking to load from Media folder, not from online)