The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.


Multi-Window Support

From the standpoint of users, the most visible new capability in Android 7.0 is multi-window support. Now, the user can be working with more than one Android activity at a time, whether from separate apps or — with the assistance of the app — from the same app. This is akin to the proprietary implementations seen in devices from Samsung, LG, Jide, and other manufacturers.

The good news — more or less — is that support for multi-window is automatic. You do not need to change anything in your Android app to have your app moved into a portion of the screen, instead of taking up the full screen.

However, you may want to tweak your app to behave better in a multi-window environment.

Prerequisites

Understanding this chapter requires you to have read the core chapters of the book.

A History of Windows

In the beginning, we were happy to have just one app on the screen at a time.

However, as phones got larger, there was increasing interest in having more than one app visible at a time. Some manufacturers handled this via their own “small apps”, such as floating calculator windows.

However, some, such as Samsung and LG, added support for split-screen dual-window environments, where two apps could be run side-by-side. These were proprietary extensions to Android that developers had to opt into.

Other manufacturers, such as Jide, set up alternative versions of Android (e.g., Jide’s Remix OS) that supported windows akin to desktop operating systems, with an arbitrary number of overlapping windows. These too were proprietary extensions, unique to those environments.

With Android 7.0, these sorts of capabilities are now part of the core OS, with standardized ways for developers to work with them.

What The User Sees

The preview of this section was eaten by a grue.

What Your Code Sees

The preview of this section left for Hollywood to appear in a reality TV show.

Opting Out

The preview of this section was stepped on by Godzilla.

Opting In

The preview of this section was eaten by a grue.

Configuring the Layout

The preview of this section was traded for a bag of magic beans.

Avoiding Stutter

The preview of this section apparently resembled a Pokémon.

Managing the Background

The preview of this section was whisked away by a shark-infested tornado.

How Low Can You Go?

The preview of this section is in an invisible, microscopic font.

Parallel Processing

The preview of this section left for Hollywood to appear in a reality TV show.

Split-Screen, HOME, and Your Activity

The preview of this section left for Hollywood to appear in a reality TV show.

Split-Screen and Orientations

The preview of this section is being chased by zombies.

Forcing Your App Into Multi-Window/Multi-Instance

The preview of this section may contain nuts.

Supporting Legacy Proprietary Multi-Window

The preview of this section was traded for a bag of magic beans.

Freeform Multi-Window Mode

The preview of this section left for Hollywood to appear in a reality TV show.