Android How to open up a browser window from an activity with URL?
How do I open up browser window within my activity. Ideally I would like them to stay inside my app with some type of em开发者_如何学Gobedded webkit activity view? How can this be done?
If I understood correctly, you can use Web View
Here you can find a tutorial on doing that.
This could help you: http://mobile.tutsplus.com/tutorials/android/android-sdk-embed-a-webview-with-the-webkit-engine/ ?
Hmmm if you just want to present the link inside a TextView, you can use a span to make the links clickable (it will be handled with the browser, clicking back will go back to the activity that contains the link):
URLSpan span = new URLSpan(url);
textView.getText().setSpan(span, start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
If you're rendering content with links, you might want to look into the Linkfy class.
精彩评论