Created
July 10, 2019 17:16
Star
You must be signed in to star a gist
Move FAB above so that it doesn't conflict with transparent floating navigation bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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