Accessing webkit methods

mjtaryan

Active Member
Licensed User
Longtime User
Is It possible to call the webkit methods using webview? How is this done? What is the syntax? Thanks.
 
Last edited:

mjtaryan

Active Member
Licensed User
Longtime User
Which methods are you asking about?

All of them, but especially those not included in the B4a WebView methods such as the one(s) related to text zoom (as opposed to the general zoom methods included in WebView). I am still trying to figure out How to accomplish making zoomed text redraw so tgat all of It remains in the screen's dimensions and requiring only vertical scrolling and NOT horizontal.

In another thread I started, NJDUDE said this was done in html, but I have discovered this is inaccurate. While html allows wordwrap, It relates only to the html content and not to the layout of a devices's screen. Experimentation reveals that zooming using the methods within WebView creates a magnifying glass effect necessitating both horizontal and vertical scrolling in order to read all the text. I need to avoid the horizontal scrooling. I know this is possible because there are several websites I frequent plus at least one app see MobiSystem's Office Suite 6 and 6.5) that do what I am looking to do in a specialized app.

Because my other thread yielded no truly useful information or solutions, i want to experiment on my own, but to do so I need access to the full webkit methods and NOT merely tge WebView methods. I know that in java the webkit methods can be accedded with a syntax like "WebView.webkit.methodcall". But I don't really know java and, so, am looking to accomplish the same thing from within B4a.

Thanks.
 
Upvote 0

mjtaryan

Active Member
Licensed User
Longtime User
There are several libraries that extend WebView: Libraries - Basic4android Wiki

Can you post a link to a relevant Java example?

Thanks, Erel. I will Taken a looking at the libraries.

I will try to find the ones I saw. I don't remember on which site I came across them. However, although what I am looking for was indirectly mentioned, the example(s) used did not included calling the particular method I especially wanted to test.

ADD:
Browsed the libraries and found three that may be useful. Will need to play with them to see If one or more will work an suitable.

My apologies, the "java examples" I mentioned where actually calls to public methods in a WebView's WebSettings. If tgese Settings methods can actually be accessed, that may be all I need. So, my questions now are How do I actually call the WebSettings methods. The two I want to try are WebSettings.GetTextZoom and WebSettings.SetTextZoom along with getting and setting the WideViewPort parameter.
 
Last edited:
Upvote 0

mjtaryan

Active Member
Licensed User
Longtime User
Have you checked the methods in the three related libraries?

I skimmed through them, but I think I will need to play with them.

Another related question: How can I determine a) When a user zooms, b) When the user stops zooming, c) the direction of the zoom and d) the start and finish zoom levels (as percent from 0 to 100)? Are there non-visible events that trigger these things?
 
Last edited:
Upvote 0
Top