Created
July 10, 2019 17:16
-
-
Save saurabharora90/711a8e4dcb54dcd8f48ae8a0f8ad6a34 to your computer and use it in GitHub Desktop.
Move FAB above so that it doesn't conflict with transparent floating navigation bar
This file contains hidden or 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