Skip to content
This repository has been archived by the owner on Mar 18, 2019. It is now read-only.

Load images from assets folder #38

Open
hllabs opened this issue Mar 9, 2018 · 3 comments
Open

Load images from assets folder #38

hllabs opened this issue Mar 9, 2018 · 3 comments

Comments

@hllabs
Copy link

hllabs commented Mar 9, 2018

How do i load images that are present inside the assets folder?

@sandeepkurne
Copy link

If your images are in assets folder try -
![test](file:///android_asset/my_image.png)

If your images are in images folder residing in assets folder try -
![test](file:///android_asset/images/my_image.png)

@douglasalipio
Copy link

douglasalipio commented Oct 9, 2018

Hey @sandeepkurne @tiagohm
Is it possible to load an image from context.cacheDir.path? Cause I'm doing like this:
![image]("${context.cacheDir.path}/main/os_tres_porquinhos.png") but It doesn't work.

The full code:

aboutMarkdownView.addStyleSheet(Github())
aboutMarkdownView.loadMarkdown("![image](${context.cacheDir.path}/repo/en/emergency support/digital/emergency-support_digital.png)")

@douglasalipio
Copy link

douglasalipio commented Oct 9, 2018

I figure out how to do it. Just put the prefix "file:///"
![alt]("file:///${context.cacheDir.path}/main/os_tres_porquinhos.png")

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants