Hi Mark, Thanks so much for the examples. I did go ahead and try using loadDataWithBaseUrl as in your example, not to any success. However, looking at your code - and seeing that it worked! - prompted me to take a step back and simplify my layout. The layout in which I had been displaying the WebView was as follows:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <WebView android:id="@+id/ad_view" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" /> <Button android:id="@+id/close_web" android:text="@string/close_web" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> As it turns out, the android:layout_height="wrap_content" used along with android:layout_weight="1" of the WebView was preventing the WebView from properly receiving events! After changing the WebView's layout_height attribute to "0px" instead of "wrap_content", shouldOverrideUrlLoading is being called and things work like a charm. This bug was particularly insidious, however, since I never would have expected that these attributes would have altered the view's ability to process clicks/touches in this way. Do you think this is an SDK bug or a documentation bug? Thanks! Dave On Sep 30, 4:19 am, Mark Murphy <[EMAIL PROTECTED]> wrote: > schmielson wrote: > > Thanks for the quick reply. Unfortunately, that does not work. The > > link text becomes highlighted to indicate that it has been clicked, > > but the URL is never loaded and the code in shouldOverrideUrlLoading > > is never called. > > Visithttp://commonsware.com/Android/, and download the source code to > Version 1.3 of my book. Here's the direct link to the ZIP file: > > http://commonsware.com/Android/source_1.3.zip > > Check out WebKit/Browser3 in the ZIP. This sample loads a > dynamically-generated Web page via loadDataWithBaseUrl(), intercepts > clicks on the link with shouldOverrideUrlLoading(), and updates the page. > > If it works for you (and I'm fairly certain I tested it this past > weekend on Android 1.0), perhaps you can see what the differences are > between the sample and your project, to determine how to get the > technique to work in your case. > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > _The Busy Coder's Guide to Android Development_ Version 1.3 Published! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

