For the More Curious: Chrome Custom Tabs (Another Easy Way)

You have already seen two ways to display web content: You can either launch the user’s web browser or embed the content in your application. There is also a third option that is a hybrid of what you have seen so far.

Chrome Custom Tabs (developer.chrome.com/​multidevice/​android/​customtabs) let you launch the Chrome web browser in a way that feels native to your application. You can configure its appearance to make it look like part of your app and feel like the user has never left your app. Figure 29.4 shows an example of a custom tab. You can see that the result looks like a mix of Google Chrome and your PhotoPageActivity.

Figure 29.4  A Chrome Custom Tab

Get Android Programming: The Big Nerd Ranch Guide, 4th Edition now with O’Reilly online learning.

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