Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ class LoginFragment : Fragment() {

ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, insets ->
val bars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.updatePadding(top = bars.top, bottom = bars.bottom)
// NOTE: ime() is required since targetSdk 35+ / edge-to-edge, otherwise the
// keyboard covers content. maxOf avoids double-padding when both are visible.
val ime = insets.getInsets(WindowInsetsCompat.Type.ime())
v.updatePadding(top = bars.top, bottom = maxOf(bars.bottom, ime.bottom))
insets
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ class LoginTwoFragment : Fragment() {

ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, insets ->
val bars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.updatePadding(top = bars.top, bottom = bars.bottom)
// NOTE: ime() is required since targetSdk 35+ / edge-to-edge, otherwise the
// keyboard covers content. maxOf avoids double-padding when both are visible.
val ime = insets.getInsets(WindowInsetsCompat.Type.ime())
v.updatePadding(top = bars.top, bottom = maxOf(bars.bottom, ime.bottom))
insets
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ class ShortFragment : Fragment() {

ViewCompat.setOnApplyWindowInsetsListener(view) { v, insets ->
val bars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.updatePadding(top = bars.top, bottom = bars.bottom)
// NOTE: ime() is required since targetSdk 35+ / edge-to-edge, otherwise the
// keyboard covers content. maxOf avoids double-padding when both are visible.
val ime = insets.getInsets(WindowInsetsCompat.Type.ime())
v.updatePadding(top = bars.top, bottom = maxOf(bars.bottom, ime.bottom))
insets
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ class TextFragment : Fragment() {

ViewCompat.setOnApplyWindowInsetsListener(view) { v, insets ->
val bars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.updatePadding(top = bars.top, bottom = bars.bottom)
// NOTE: ime() is required since targetSdk 35+ / edge-to-edge, otherwise the
// keyboard covers content. maxOf avoids double-padding when both are visible.
val ime = insets.getInsets(WindowInsetsCompat.Type.ime())
v.updatePadding(top = bars.top, bottom = maxOf(bars.bottom, ime.bottom))
insets
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ class UploadFragment : Fragment() {

ViewCompat.setOnApplyWindowInsetsListener(view) { v, insets ->
val bars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.updatePadding(top = bars.top, bottom = bars.bottom)
// NOTE: ime() is required since targetSdk 35+ / edge-to-edge, otherwise the
// keyboard covers content. maxOf avoids double-padding when both are visible.
val ime = insets.getInsets(WindowInsetsCompat.Type.ime())
v.updatePadding(top = bars.top, bottom = maxOf(bars.bottom, ime.bottom))
insets
}

Expand Down
Loading