John Woodsmall Active Member Licensed User Longtime User Jul 11, 2018 #1 when i open a webview with scale to fit on i get a small image that can be expanded with fingers. if not scale to fit...it is too big and will not expand with fingers. how can i expand the size of the starting image? (i tried the wkwebview as well...same thing). Attachments Result_SMHS.jpg 251.8 KB · Views: 600
when i open a webview with scale to fit on i get a small image that can be expanded with fingers. if not scale to fit...it is too big and will not expand with fingers. how can i expand the size of the starting image? (i tried the wkwebview as well...same thing).
Erel B4X founder Staff member Licensed User Longtime User Jul 12, 2018 #2 I guess that the web page itself is larger than the image. If it is a simple image then it will be simpler to download it with iHttpUtils2 and show it with ImageView. Upvote 0
I guess that the web page itself is larger than the image. If it is a simple image then it will be simpler to download it with iHttpUtils2 and show it with ImageView.
Osp Member Licensed User Longtime User Jul 12, 2018 #3 I would recommend trying some css in the webview to scale the image, there is for example such things: background: url(greatimage.jpg); background-size: cover; //(or cntain) if you apply this rule for the html or maybe body or the element the image is "in" it should fill the whole view (if the parent element is filling the whole view as well). Upvote 0
I would recommend trying some css in the webview to scale the image, there is for example such things: background: url(greatimage.jpg); background-size: cover; //(or cntain) if you apply this rule for the html or maybe body or the element the image is "in" it should fill the whole view (if the parent element is filling the whole view as well).
John Woodsmall Active Member Licensed User Longtime User Jul 12, 2018 #4 i have the path to the image (it is dynamic so i get it from the httputils) how do i make the source for the imageview that path? Upvote 0
i have the path to the image (it is dynamic so i get it from the httputils) how do i make the source for the imageview that path?
Erel B4X founder Staff member Licensed User Longtime User Jul 12, 2018 #5 Code: Copy Dim j As HttpJob j.Initialize("", Me) j.Download(link here) Wait For (j) JobDone(j As HttpJob) If j.Success Then ImageView1.Bitmap = j.GetBitmap 'or better j.GetBitmapResize End If j.Release Upvote 0
Code: Copy Dim j As HttpJob j.Initialize("", Me) j.Download(link here) Wait For (j) JobDone(j As HttpJob) If j.Success Then ImageView1.Bitmap = j.GetBitmap 'or better j.GetBitmapResize End If j.Release