Displaying content with the WebView class

The WebView class (in the android.webkit package) is often a logical choice for content-centric designs and holds some very serious advantages over building the user interface and a normal Android XML layout resource. The WebView class offers you a single point at which you can place all of the content for a screen, and it handles all of its own history and scrolling, making your code very simple to write.

When displaying content that requires complex layout and/or lots of text content (which may require markup), the WebView class is a highly favorable option. Having built-in support for HTML and CSS mark up, it reduces the number of widgets that you'll need on the screen. Given that Android makes use ...

Get Android User Interface Development now with O’Reilly online learning.

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