Companion

object Companion

Utility methods for PopupToolbar.

Functions

Link copied to clipboard
fun hasSizeChanged(oldWidth: Int, oldHeight: Int, newWidth: Int, newHeight: Int): Boolean

Returns true if the width or height has changed between the old and new values.

Link copied to clipboard
fun shouldRecreatePopupWindowForSizeChange(isFirstPopupLayoutPass: Boolean, oldWidth: Int, oldHeight: Int, newWidth: Int, newHeight: Int): Boolean

Returns true if the popup window should be dismissed and recreated due to a size change. On the first layout pass after showing, the popup is resized in place instead of being recreated so that the enter animation is preserved.