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 is being chased by zombies.

What Your Code Sees

The preview of this section is presently indisposed.

Opting Out

The preview of this section was last seen in the Bermuda Triangle.

Opting In

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

Configuring the Layout

The preview of this section was stepped on by Godzilla.

Avoiding Stutter

The preview of this section is in the process of being translated from its native Klingon.

Managing the Background

The preview of this section was lost in the sofa cushions.

How Low Can You Go?

The preview of this section took that left turn at Albuquerque.

Parallel Processing

The preview of this section was the victim of a MITM ('Martian in the middle') attack.

Split-Screen, HOME, and Your Activity

The preview of this section was abducted by space aliens.

Split-Screen and Orientations

The preview of this section was stepped on by Godzilla.

Forcing Your App Into Multi-Window/Multi-Instance

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

Supporting Legacy Proprietary Multi-Window

The preview of this section is sleeping in.

Freeform Multi-Window Mode

The preview of this section is off trying to sweet-talk the Khaleesi into providing us with a dragon.