0
Good afternoon!
I’m getting an html string to display in a webview.
Inside that string may or may not be images, but for me to display it, I have to pass a base URL before src= "crmResources/, example: "http://desenv.ex.com.br/crmResources/..."
Then I have to save the whole String until I find an image, save it in another variable concatenating with a Urlbases variable (example: http://desenv.ex.com.br/), see if there are more images to do the same job and finally concatenate everything into a String to display in webview.
What would be the best way or logic to do that? Remembering that images may or may not exist, and between them there may be other html elements.
The html string you get, is it like the whole page? If yes, you could use regular expressions to replace src=" with the image address
– Alisson
This would actually be the content, paragraphs, subheadings, images, lists and etc
– meire
Have you tried with replaceAll? variableString.replaceAll("<img src="", "<img src="http://addressees/");
– Alisson
Thanks Alisson, it worked great, I had some problems with the , but it worked
– meire
Please, thank you for helping. :)
– Alisson