Is it possible to record touch events via WebView in its active part without losing the functionality of links?
Consider a WebView showing a web page with links. If the user clicks on the link, I would like WebView to handle the touch event. If the user deletes something elsewhere, I would like the activity to handle the touch event.
How can I do that?
Yes it is.
(I can’t talk more about this if you don’t clarify your question.)
, , - onTouchEvent(), , , X, Y ( html). , , , , Javascript WebView, javascript , - . , ... .
onTouchEvent()
WebView :
mWebView.setWebViewClient(new WebViewClientOverrider());
:
private class WebViewClientOverrider extends WebViewClient { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { //TODO handle the link return true; } }
, TODO .
android.webkit.CallbackProxy.uiOverrideUrlLoading()
. http://www.javapractices.com/topic/TopicAction.do?Id=78, ( WebView.loadUrl()).
Source: https://habr.com/ru/post/1789779/More articles:What does this mean: map (1 +) - scalaPHP rawurlencode is not equal to JavaScripts output! What for? - javascriptXSLT - adding a new element in a specific place - xsltIs a public setter necessary for a private static variable? - javaCan ASP query a database located on another server? - asp-classicHow to prevent CKEditor insertHtml from wrapping an element inside in webkit browsers? - smartyСоставление класса сущностей инфраструктуры Entity с простым .NET-классом - c#Draw a circle and save to UIImage - cocoa-touchjavascript в моем .html.erb с использованием встроенных задач ruby-escaping - javascriptFluent-Nhibernate and PropertyRef Links Making Lazy Loading Choices - nhibernateAll Articles
in webkit browsers? - smarty