You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
private fun applyWindowInsets(view: View) {
ViewCompat.setOnApplyWindowInsetsListener(view) { _, windowInsets ->
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
// Apply the insets as a margin to the view. Here the system is setting
// only the bottom, left, and right dimensions, but apply whichever insets are
// appropriate to your layout. You can also update the view padding
// if that's more appropriate.
view.updateLayoutParams<ViewGroup.MarginLayoutParams> {
leftMargin =0
bottomMargin = 0
rightMargin =0
topMargin = 0
}
// Return CONSUMED if you don't want want the window insets to keep being
// passed down to descendant views.
WindowInsetsCompat.CONSUMED
}
}
Add this line to onCreate() if edge-to-edge == true
dmitriy-chernysh
changed the title
Add a new param "edgeToEdge" (true/false) to ActivitySettings
[common-ui] Add a new param "edgeToEdge" (true/false) to ActivitySettings
Dec 25, 2021
If edgeToEdge == true
set margins to 0
Add this line to onCreate() if edge-to-edge == true
The text was updated successfully, but these errors were encountered: