View extensions cleanup

This commit is contained in:
Jay 2020-05-02 22:26:12 -04:00
parent 8de38e379a
commit 49b18181e7

View File

@ -188,12 +188,7 @@ fun View.applyWindowInsetsForRootController(bottomNav: View) {
viewTreeObserver.removeOnGlobalLayoutListener(this) viewTreeObserver.removeOnGlobalLayoutListener(this)
setOnApplyWindowInsetsListener { view, insets -> setOnApplyWindowInsetsListener { view, insets ->
view.updateLayoutParams<FrameLayout.LayoutParams> { view.updateLayoutParams<FrameLayout.LayoutParams> {
val attrsArray = intArrayOf(android.R.attr.actionBarSize)
val array = view.context.obtainStyledAttributes(attrsArray)
// topMargin = insets.systemWindowInsetTop + array
// .getDimensionPixelSize(0, 0)
bottomMargin = bottomNav.height bottomMargin = bottomNav.height
array.recycle()
} }
insets insets
} }