My app receives html code from an API and is later displayed in a Webview.
It sometimes contains images with different width settings, often to big so it doesn´t show properly in my app.
That means that my String can contain one, two, three or more snipplets looking like this: width="612" but the "612" can be any number telling that image width.
I put this in my code:
Works good for the first image, but number two and below still have it´s original size.
Is there any way to replace using wildcards or something similar? Thinking of something like this:
Or how can I solve the problem with replacing all width="xxx" in my String?
I assume a loop or something could solve it but my head is stuck right now.
Please help!
It sometimes contains images with different width settings, often to big so it doesn´t show properly in my app.
That means that my String can contain one, two, three or more snipplets looking like this: width="612" but the "612" can be any number telling that image width.
I put this in my code:
B4X:
post_content = post_content.Replace(post_content.SubString2(post_content.IndexOf("width"), post_content.IndexOf("width")+11),"width=""324")
Is there any way to replace using wildcards or something similar? Thinking of something like this:
B4X:
post_content = post_content.Replace("width=""***","width=""324")
Or how can I solve the problem with replacing all width="xxx" in my String?
I assume a loop or something could solve it but my head is stuck right now.
Please help!