Member-only story

Learning Android Development

Jetpack Compose Popup — Master It!

Expand your View Beyond the Parent Composable Boundary with Popup

Photo by Mick De Paola on Unsplash

When we program our Jetpack Compose View, we might not realize there’s a limitation we cannot use normal Jetpack Compose View programming to achieve.

The limitation is as below. In any Compose View, it is not possible to compose another view from within, that is Bigger than the Containing (Parent) View or Outside the View (as shown in the Diagram below).

Fortunately, Jetpack Compose does provide us with two Compose Components that we can leverage for this purpose

  1. Dialog
  2. Popup

Note: Both these Components are created not using conventional Jetpack Compose way of programming, instead using AbstractComposeView and also utilizing the WindowManager one has to create it. Hence under the hood, it does require some core Android framework knowledge of development.

The focus of this article is to share everything about Popup, with provided illustrations for one to master it easily. Through it, you…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Mobile App Development Publication
Mobile App Development Publication

Published in Mobile App Development Publication

Sharing iOS, Android and relevant Mobile App Development Technology and Learning

Elye - A One Eye Dev By His Grace
Elye - A One Eye Dev By His Grace

Written by Elye - A One Eye Dev By His Grace

Sharing Software Learning, Life and Faith Journey

Responses (3)

What are your thoughts?

do you how to dim background of popUp

nice tutorial

I totally don't understand popup alignment attribute and how to use it.
I have a code like this:
"Box(modifier = Modifier.padding(start = 4.dp).weight(1f, false)) {
Text(text = "")
if (weeksPopupShown) {
Popup(
alignment = Alignment.BottomStart,
onDismissRe…