Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Jahren, 4 Monaten
Letzter Beitrag:
vor 2 Jahren, 4 Monaten
Beteiligte Autoren:
Peter Muckle, Fabrice Harari

WM20: image and page links html control

Startbeitrag von Peter Muckle am 10.04.2016 14:16

Hi All,

I am making a series of html help pages for my Android app and have hit a problem with images and page links.

The files are installed into the < current directory >

eg. help1.html, help2.html, logo132.jpg

Loading the html file into a HTML control is no problem, but I can't work out how to reference images and other html files as links.

For images I am trying - spaces added to < and >

< img src="logo132.jpg" >

For links, eg from help001.html to help002.html:

< a href="help002.html" >

Neither work in an html control.

Can anyone tell me what I am doing wrong?




OK, I worked it out..

I moved everything to a folder called 'help'

For images :

< img src="file:////sdcard/help/logo132.jpg" >

For links :

< a href="file:////sdcard/help/help002.html" >


von Peter Muckle - am 10.04.2016 14:46
Hi Peter,

be careful... depending on the android device/os version, the path to the scdard can be quite different. So ////sdcard will NOT work on all devices.
If you want to be good all the time, you should take a screenshot of your finished help and display that image instead.

Best regards

von Fabrice Harari - am 11.04.2016 14:01
Hi Fabrice,

Thanks for tip, very useful.

To explain the background; the help for the app I am working on requires lots of text and videos, and will also have sections/articles added every so often. More like an offline website or ebook. For this reason I thought html would be the best way to deliver it, and to manage the addition of new sections. This is in addition to the app help system, which is much simpler. I tried running the html in a browser but the page was too small to read easily, whereas the same html in an HTML control was much easier to read, plus I can add a contents slide-out page.

I am wondering about putting the html files into one database, and the images and videos into another, then 'unpacking' the files one by one into fCurrentDir(), after running a find/replace on each file to update 'file:////FileDirectory' to file:///fCurrentDir(). Then step through the video/images and extract them to fCurrentDir().

Does that sound feasible, or does anyone have a better way?

Thanks again


von Peter Muckle - am 12.04.2016 10:01
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.