S steele2012 Member Licensed User Longtime User Dec 20, 2019 #1 Can you help me How to show website via url on the device
drgottjr Expert Licensed User Longtime User Dec 20, 2019 #2 if you want a browser: Code: Dim i As Intent i.Initialize(i.ACTION_VIEW, "https://www.google.com") StartActivity(i) if you want a webview: Code: dim webview1 as webview webview.initialize("wv") activity.addview(webview1,0%x,0%x,100%x,100%y) webview.loadurl("https://www.google.com") Upvote 0
if you want a browser: Code: Dim i As Intent i.Initialize(i.ACTION_VIEW, "https://www.google.com") StartActivity(i) if you want a webview: Code: dim webview1 as webview webview.initialize("wv") activity.addview(webview1,0%x,0%x,100%x,100%y) webview.loadurl("https://www.google.com")
S steele2012 Member Licensed User Longtime User Dec 20, 2019 #3 Thank you drgottjr I have been trying to do this for 5 days Amazing Upvote 0
S steele2012 Member Licensed User Longtime User Jan 9, 2020 #4 How would you do the zoom out so it will fit the screen Upvote 0
S steele2012 Member Licensed User Longtime User Jan 9, 2020 #5 how would i adapt this setting to the new way WebView Settings.set Default Zoom(WebView1, "FAR") Upvote 0
drgottjr Expert Licensed User Longtime User Jan 9, 2020 #6 steele2012 said: How would you do the zoom out so it will fit the screen Click to expand... normally you add: Code: <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> to the <head> region of your html. you can also use css to set the body width (100%). this, of course, only works if you're creating your own html content. if you're just using a webview to browse public websites, you should know that 1) the hard work has already been done for you with chrome, and 2) webview is only a subset of a browser. there are functions which work in a real browser that do not work in a webview. as for webviewsettings, you include the webviewsettings library in your project and initialize it after initializing your webview. (note: this setting is deprecated, so if it still works, it could un-work whenever google updates the view,which is a few times a year). in any case, my understanding is that it is tied to screen density. i believe it would be an effort to ensure a similar viewing experience of your content across devices with varying screen sizes. i do not believe this means you necessarily see the page fitting the screen. i'm pretty sure that is controlled by the instructions mentioned above. since i don't know what your intentions are regarding webview, there's not much more to say. except a webview is not a browser. Upvote 0
steele2012 said: How would you do the zoom out so it will fit the screen Click to expand... normally you add: Code: <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> to the <head> region of your html. you can also use css to set the body width (100%). this, of course, only works if you're creating your own html content. if you're just using a webview to browse public websites, you should know that 1) the hard work has already been done for you with chrome, and 2) webview is only a subset of a browser. there are functions which work in a real browser that do not work in a webview. as for webviewsettings, you include the webviewsettings library in your project and initialize it after initializing your webview. (note: this setting is deprecated, so if it still works, it could un-work whenever google updates the view,which is a few times a year). in any case, my understanding is that it is tied to screen density. i believe it would be an effort to ensure a similar viewing experience of your content across devices with varying screen sizes. i do not believe this means you necessarily see the page fitting the screen. i'm pretty sure that is controlled by the instructions mentioned above. since i don't know what your intentions are regarding webview, there's not much more to say. except a webview is not a browser.
Erel B4X founder Staff member Licensed User Longtime User Jan 9, 2020 #7 [B4X] Use WebView to show large images Better to use: [B4X] HugeImageView - show very large images Depends on: XUI and JavaObject. 'xui is a global XUI object. Private Sub ShowImage(WV As WebView, Dir As String, FileName As String) #if B4A Dim jo As JavaObject = Me jo.InitializeContext 'comment this line if calling this... www.b4x.com Upvote 0
[B4X] Use WebView to show large images Better to use: [B4X] HugeImageView - show very large images Depends on: XUI and JavaObject. 'xui is a global XUI object. Private Sub ShowImage(WV As WebView, Dir As String, FileName As String) #if B4A Dim jo As JavaObject = Me jo.InitializeContext 'comment this line if calling this... www.b4x.com
S steele2012 Member Licensed User Longtime User Jan 10, 2020 #8 Thanks drgottjr for that info,I thought webview was web browser like in visual studio, learn something new every day I just want a simple webbrowser to show a webpage from my website for my taxs reports Upvote 0
Thanks drgottjr for that info,I thought webview was web browser like in visual studio, learn something new every day I just want a simple webbrowser to show a webpage from my website for my taxs reports
drgottjr Expert Licensed User Longtime User Jan 10, 2020 #9 have you tried: Code: dim webview1 as webview webview.initialize("wv") activity.addview(webview1,0%x,0%x,100%x,100%y) webview.loadurl("https://www.steele2012website.com/page_with_tax_info.html") ' <----- real url goes here what do you get? can you add: Code: <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> just below the <!DOCTYPE html> header line in your html document? giving us the url would be nice so we could see for ourselves what it looks like in a webview, but, presumably, you don't want sensitive personal data plastered all over the forum, so i realize that may not be possible. anyway, load the page from your site into a webview, and report back. Upvote 0
have you tried: Code: dim webview1 as webview webview.initialize("wv") activity.addview(webview1,0%x,0%x,100%x,100%y) webview.loadurl("https://www.steele2012website.com/page_with_tax_info.html") ' <----- real url goes here what do you get? can you add: Code: <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> just below the <!DOCTYPE html> header line in your html document? giving us the url would be nice so we could see for ourselves what it looks like in a webview, but, presumably, you don't want sensitive personal data plastered all over the forum, so i realize that may not be possible. anyway, load the page from your site into a webview, and report back.
S steele2012 Member Licensed User Longtime User Jan 21, 2020 #10 Thanks mate just the same, i got a bootleg builder with webpage response thast's done the trick Thanks to all you guys Last edited: Jan 22, 2020 Upvote 0
Thanks mate just the same, i got a bootleg builder with webpage response thast's done the trick Thanks to all you guys