T TSW2017 Member Licensed User Oct 23, 2017 #1 Hi , i'm just trying to show a gif inside a webview like B4A but it doesn't work. Any tips? I'm following the example of Urel but not succes. WebView1.LoadUrl("file://" & File.Combine(File.DirAssets, "MyGIF.gif")) . I have the gif stored in App folder files. thank you
Hi , i'm just trying to show a gif inside a webview like B4A but it doesn't work. Any tips? I'm following the example of Urel but not succes. WebView1.LoadUrl("file://" & File.Combine(File.DirAssets, "MyGIF.gif")) . I have the gif stored in App folder files. thank you
BillMeyer Well-Known Member Licensed User Longtime User Oct 23, 2017 #2 Try this: B4X: Dim txt As String txt = "<html><head></head><body><img width=""100%"" height=""100%"" src=file:///"&File.Combine(File.DirAssets,"MyGif.gif")&"></body></html>" WebView1.LoadHtml(txt) Upvote 0
Try this: B4X: Dim txt As String txt = "<html><head></head><body><img width=""100%"" height=""100%"" src=file:///"&File.Combine(File.DirAssets,"MyGif.gif")&"></body></html>" WebView1.LoadHtml(txt)
Erel B4X founder Staff member Licensed User Longtime User Oct 24, 2017 #3 Cross platform code to reference an asset file: https://www.b4x.com/android/forum/t...-from-assetsdir-in-webview.78500/#post-497506 Upvote 0
Cross platform code to reference an asset file: https://www.b4x.com/android/forum/t...-from-assetsdir-in-webview.78500/#post-497506