hey Ken, WebViews can do anything TextViews can, you just have to format the contents as legal HTML to get the right things to happen. depending on the features you want, this might be as easy as wrapping everything with <html><body>YOUR STUFF HERE</body></html>. but one complication is that IIRC webviews won't auto-detect links in regular text, they need to be marked up with anchor tags. if your links are embedded then this might be work for you.
however, once you get this sorted out, then you can register a WebViewClient with your WebView, whose shouldOverrideUrlLoading() will get called when someone clicks on a link. you can then decide what to do, and whether the WebView sees the link after you do. this mechanism enables all kinds of crazy stuff to happen. i use it to preprocess HTML before the WebView sees it, or hand links off to Android activities for native handling, etc. most anything can be done. it's pretty straightforward. hth J >Jason, > >Thanks for the response. This is turning into a *thing* now. I'm >starting to think it can't be done or there is a serious bug in >Android that won't let it work. > >But my question now is, can I use a webview like a textview? I have a >textview I use as a 'title bar' header, and another textview below >scrolls in a scrollview. I assume I can do things like that. But what >about building the contents? I use a textview because I have tons of >data in a string-array that I insert in the textview. Is there some >site that is a good primer on building an html page in a webview on >the fly in android? > >Ken > >On Sep 3, 11:21 am, Jason Proctor <[email protected]> >wrote: >> i'm not sure whether this is possible in a TextView, but in a >> WebView, you can override the handling of clicks on URLs and do >> pretty much whatever you like. >> > > check out WebViewClient.shouldOverrideUrlLoading(). > > >> >Is it possible to use a hyperlink in android to do something other >> >than open a web page? I want to use a hyperlink in a TextView to >> >luanch a new activity, or something along those lines. I have a large >> >document and I want to let the user jump to references within the doc >> >(like a footnote or something). Can this be done? >> >> >Ken >> >> -- >> jason.vp.engineering.particle > -- jason.vp.engineering.particle --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

