D db0070 Active Member Licensed User Longtime User Jan 20, 2016 #1 I have created a webview in designer, PageFinished event does fire but the Click event does not fire.
I have created a webview in designer, PageFinished event does fire but the Click event does not fire.
JonPM Well-Known Member Licensed User Longtime User Jan 20, 2016 #2 See here:https://www.b4x.com/android/forum/threads/webview-touch-event.55966/ Upvote 0
D db0070 Active Member Licensed User Longtime User Jan 20, 2016 #3 I really don't understand that link and I have no idea how this works. I have an image size 720 x 600, and I create a webview of width 600 and height = width*600/720 so the image is the same ratio. Now works fine on the iPad, but on the iPhone where the width is 300, the webview does not resize the image! I have tried the following code as well:- Code: Copy If Main.ActivityWidth < 550 Then webView1.SizeToFit webView1.ScaleToFit = True End If Webview appears to have its own life!! I am stuck I have also tried adding the webview to a panel and set the webview to fit the panel. Upvote 0
I really don't understand that link and I have no idea how this works. I have an image size 720 x 600, and I create a webview of width 600 and height = width*600/720 so the image is the same ratio. Now works fine on the iPad, but on the iPhone where the width is 300, the webview does not resize the image! I have tried the following code as well:- Code: Copy If Main.ActivityWidth < 550 Then webView1.SizeToFit webView1.ScaleToFit = True End If Webview appears to have its own life!! I am stuck I have also tried adding the webview to a panel and set the webview to fit the panel.
D db0070 Active Member Licensed User Longtime User Jan 21, 2016 #4 Ok, I have solved it by putting the height and width of the image to be the same as the webview, inside the html of LoadHtml Upvote 0
Ok, I have solved it by putting the height and width of the image to be the same as the webview, inside the html of LoadHtml
JonPM Well-Known Member Licensed User Longtime User Jan 21, 2016 #5 I don't understand what this has to do with the title of your post and your first question about click event not working Upvote 0
I don't understand what this has to do with the title of your post and your first question about click event not working
D db0070 Active Member Licensed User Longtime User Jan 21, 2016 #6 I was struggling with click events and size of images in webview which did not work as I expected them to work. The link: https://www.b4x.com/android/forum/threads/webview-touch-event.55966/ still does not make sense to me, but I think it is saying to embed this within the html. And that is what I did which made it work. But, you are right the title is misleading. I have not done the click event yet as I don't need it now, but for the future, is there an example of a click event code for webview? Upvote 0
I was struggling with click events and size of images in webview which did not work as I expected them to work. The link: https://www.b4x.com/android/forum/threads/webview-touch-event.55966/ still does not make sense to me, but I think it is saying to embed this within the html. And that is what I did which made it work. But, you are right the title is misleading. I have not done the click event yet as I don't need it now, but for the future, is there an example of a click event code for webview?