@Override
    public void onMultiWindowModeChanged(boolean isInMultiWindowMode) {
        super.onMultiWindowModeChanged(isInMultiWindowMode);

        Log.d(mLogTag, "onMultiWindowModeChanged: " + isInMultiWindowMode);
    }
Activity that logs all key lifecycle callbacks to {@link Log}.
Output is also logged to the UI into a {@link LogFragment} through {@link #initializeLogging()}
and {@link #stopLogging()}.
MultiWindowPlayground/Application/src/main/java/com/android/multiwindowplayground/activities/LoggingActivity.java