Chapter 15. Embedding the WebKit Browser

Other GUI toolkits let you use HTML for presenting information, from limited HTML renderers (e.g., Java/Swing and wxWidgets) to embedding Internet Explorer into .NET applications. Android is much the same, in that you can embed the built-in web browser as a widget in your own activities, for displaying HTML or full-fledged browsing. The Android browser is based on WebKit, the same engine that powers Apple's Safari web browser.

The Android browser is sufficiently complex that it gets its own Java package (android.webkit). Using the WebView widget itself can be simple or powerful, based on your requirements.

A Browser, Writ Small

For simple stuff, WebView is not significantly different from any other widget ...

Get Beginning Android 3 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.