Tuesday, July 12, 2011

Re: [android-developers] Re: WebView - How can I block/deactivate all the links in a WebView after the content is loaded?

For overriding the url loading methods, see:
http://developer.android.com/reference/android/webkit/WebViewClient.html#shouldOverrideUrlLoading(android.webkit.WebView,
java.lang.String)

For the javascript, it would be something like
getElementsByTagName('a'). Then iterate over the object array and set
an empty href, or override the onclick method. It's up to you.

On Tue, Jul 12, 2011 at 4:03 AM, Nicolas Copernico
<nicolascopernico@gmail.com> wrote:
> It sounds good, could you just point me out the classes or methods
> involved on this?
> -I'm already using a webview client in order to load all the "next
> pages" under the application.
>
> - As a side note, what would be that piece of javascript ? I do have
> access to server side, maybe it would be easier to block those links
> from the website.
>
> Gracias Miguel
> Dave
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

--
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/http://www.youtube.com/user/revoltingx

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment