I tried this approach and it worked out fine.
I followed step 3 and
I used WebViewClient implemented my own
shouldOverrideUrlLoading()
>From within this method
public boolean shouldOverrideUrlLoading(WebView view, String url) {
             Intent i = new Intent( Intent.ACTION_VIEW, Uri.parse(url) );
             i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );

             try
             {
                     view.getContext().startActivity( i );
             }
             catch (Exception e)
             {
                 Log.e("Problem", e.getMessage());
             }
            return true;
        }

This enabled me to get clicks and also handoff the URL to a different
WebView.

If you see issues with this approach,  pls let me know.

Thank you.



On Thu, Apr 9, 2009 at 8:08 AM, rch <ravichitt...@gmail.com> wrote:

>
> Step 1:
> I am subclassing WebView and rendering html content properly. The
> intial content is very small with a div and image /link
> This is displayed in a LInear Layout along with a TextView and
> ListView. That is my first screen/activity of the application.
>
> Step 2:
> When I click on a link on this webview, it goes through the
> webViewclient and expands to full screen to fit the content of the
> requested page.
>
> After Step 2, I am not able to go back to my activity screen once the
> content is displayed.
> When I click on the back button to getback to my activity screen
> close my activity and goes to the phone's  applications desktop. (i.e
> goes out of my application).
>
> Step 3:
> In order to fix this issue, I stopped setting my own subclasssed
> WebViewClient.  After doing this, the it seems to render the clicked
> page in a webView as subactivity. Now When I click on backbutton, it
> goes back to the activity screen.   But, the issue now is, I am not
> catch event when a link is clicked.   How can I catch click events in
> this case.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to