For the More Curious: UI Updates and Multi-Window Mode

Prior to Android 7.0 Nougat, most activities spent very little time in the paused state. Instead, activities passed through the paused state quickly on their way to either the resumed state or the stopped state. Because of this, many developers assumed they only needed to update their UI when their activity was in the resumed state. It was common practice to use onResume() and onPause() to start or stop any ongoing updates related to the UI (such as animations or data refreshes).

When multi-window mode was introduced in Nougat, it broke the assumption that resumed activities were the only fully visible activities. This, in turn, broke the intended behavior of many apps. Now, ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.