I Inman Well-Known Member Licensed User Longtime User Apr 26, 2013 #1 As the title says, I have an image that was downloaded with HttpClient (to DirInternal or External). Since I want to provide pinch-to-zoom gestures, I am thinking of displaying this image inside a webview. But I am not sure how to specify the path to this image. Any idea?
As the title says, I have an image that was downloaded with HttpClient (to DirInternal or External). Since I want to provide pinch-to-zoom gestures, I am thinking of displaying this image inside a webview. But I am not sure how to specify the path to this image. Any idea?
Erel B4X founder Staff member Licensed User Longtime User Apr 26, 2013 #2 Here is an example: Code: Sub Activity_Create(FirstTime As Boolean) Dim wv As WebView wv.Initialize("") Activity.AddView(wv, 0, 0, 50%x, 50%y) wv.LoadHtml("<img src=""file://" & File.Combine(File.DirRootExternal, "1.jpg") & """/>") End Sub Upvote 0
Here is an example: Code: Sub Activity_Create(FirstTime As Boolean) Dim wv As WebView wv.Initialize("") Activity.AddView(wv, 0, 0, 50%x, 50%y) wv.LoadHtml("<img src=""file://" & File.Combine(File.DirRootExternal, "1.jpg") & """/>") End Sub
coslad Well-Known Member Licensed User Longtime User May 25, 2013 #3 Hi Erel i tried your code , but if i try to show an large image , bigger than screen , the image doesn't been resized, is there a way to show all the image into the webview even though the image is bigger then the webview? Thanks Upvote 0
Hi Erel i tried your code , but if i try to show an large image , bigger than screen , the image doesn't been resized, is there a way to show all the image into the webview even though the image is bigger then the webview? Thanks
Erel B4X founder Staff member Licensed User Longtime User May 28, 2013 #4 You can call wv.Zoom until it returns False. Upvote 0