O'Reilly logo

Kotlin Programming: The Big Nerd Ranch Guide, First Edition by David Greenhalgh, Josh Skeen

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

Saved Instance State

Your character attribute app is really shaping up. You can press GENERATE and create character stats to your heart’s content. But there is still a problem. To see it, run the emulator, then simulate rotating the phone by clicking on one of the rotation icons in the emulator options window (Figure 21.16):

Figure 21.16  Rotating the emulator

Rotating the emulator

The UI shows different character data (Figure 21.17):

Figure 21.17  Different character data after rotating

Different character data after rotating

The data shown in the UI changed because of how Android’s ...

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