O'Reilly logo

Android Programming for Beginners by John Horton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The dual-Fragment address book mini app

The app will show a list of names and allow the user to tap on a name so that it displays the address. What is new about this app is that when we compare it to the Note To Self app, it will behave differently depending upon whether it is in the portrait or landscape orientation.

When in the portrait orientation, tapping on a name will cause a new Activity to open and display the address. When in the landscape mode, tapping on a name will cause the address to be shown on the right-hand side of the screen in the same Activity. This next image clarifies this visually:

The dual-Fragment address book mini app

This is the kind of behavior a user might expect ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required