WindowManager

class WindowManager(context: Context)

Constructors

Link copied to clipboard
constructor(context: Context)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun addView(view: View)
Link copied to clipboard
fun destroy()
Link copied to clipboard
fun pause()

The layout must be removed from the windowManager before the activity is destroyed, or the window will be leaked. Therefore we add/remove the ownerView in resume/pause.

Link copied to clipboard
fun removeView(view: View)
Link copied to clipboard
fun resume(ownerView: View)

An owner View can only be added to the WindowManager after the activity has finished resuming. Therefore, we must use post to ensure that the window is only added after resume is finished.