Sukitha Udugamasooriya wrote:
> I have a webview and need to trigger a function when a user clicks on
> particular url.
> 
> How can I achieve this?

1. Implement a WebViewClient subclass

2. Override shouldOverrideURLLoading() on your WebViewClient subclass

3. Attach an instance of your WebViewClient subclass to the WebView via
setWebViewClient()

4. Put smarts in shouldOverrideURLLoading() to handle your particular URL

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_
Version 0.9 Available!

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

Reply via email to