Resizable Apps & Multi-Window Support in Android

Mar 30 2021 · Kotlin 1.4, Android 11, Android Studio 4

Part 1: Resizable Apps & Multi-Window Support in Android

06. Launch Activities In Multi-Window Mode

Episode complete

Play next episode

Next
About this episode
Leave a rating/review
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 05. Implement Multi-Window Mode Checks Next episode: 07. Enable Drag & Drop Support: Part 1

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

Another really cool thing you can do with multi-window is launch new activities directly in that mode. This means if you have other apps that support split-screen, instead of launching them in your current screen, you can launch them in the other split of the screen, so you can use both apps at the same time.

fun getIntent(context: Context, shouldLaunchInMultiWindow: Boolean, note: Note? = null) =
  Intent(context, AddNoteActivity::class.java).apply {
    putExtra(KEY_NOTE, note)

  }
if (shouldLaunchInMultiWindow) {
  flags = Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT or
    Intent.FLAG_ACTIVITY_MULTIPLE_TASK or
    Intent.FLAG_ACTIVITY_NEW_TASK
  }
private fun showNoteDetails(note: Note? = null) {
  startActivity(AddNoteActivity.getIntent(this, isInMultiWindowMode, note))
}