Thursday, December 27, 2012

The Application Lifecycle and Its Dual


Building an app was fun, so let's look at the next tutorial, on lifecycles. Maybe it'll modify the app I have to help me understand Karim's slide 46.

Slide 46 is the dual of the pyramid graphic, in the tutorial, which shows the states as nodes, with the functions that move between them as edges. Slide 46, in contrast, has the functions as nodes, and the states as edges.

Either way, I need to learn the states and how activities move among them.

Reading through the general description, I look back at my sources and find both of my activities have an OnCreate(), but none of the other functions. I wonder where those are.

Another mystery is the difference among what look like almost identical things, such as Paused and Stopped.  "Paused" means "partially obscured," but when does that ever happen? Apps always take up the whole screen, right?

The next step in the tutorial answers that one, right away! A popup, such as a dialogue box, partially obscures, so it pauses the app.

The rest of the tutorial talks in generalities. There are code snippets, but there's no real exercise.

Bummer.

No comments:

Post a Comment