Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Move FAB above so that it doesn't conflict with transparent floating navigation bar
root.setOnApplyWindowInsetsListener { _, insets ->
val fabLp = fab.layoutParams as CoordinatorLayout.LayoutParams
fabLp.bottomMargin = fabOriginalBottomMargin + insets.systemWindowInsetBottom
fab.layoutParams = fabLp
insets.consumeSystemWindowInsets()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment