mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
The commit primarily fixes a few overlapping issues caused by the window inset handling. Previously, there were two main issues: * Because setTransparentNavigationBar() checked for portrait mode, the inset logic never executed in landscape mode. This caused the app to overlap the status bar and navigation bar. * The inset logic did not have handling for displayCutout insets. In landscape mode, this would cause the app to overlap the notch or camera hole punch area on phones. In addition to fixing those issues, this commit simplifies the inset logic a bit: * applyWindowInsets() now accepts an EnumSet of WindowInsetPosition to avoid needing to duplicate logic for the various position combinations. * Insets are now applied to the main container in the layout instead of individual elements where possible. This eliminates the need for the previous manual IME height handling logic in BOTTOM_IME vs TOP_BOTTOM_IME (for avoiding the insets being applied twice). * Since insets are now applied to the main layout container, applyWindowInsets() now takes systemBars, displayCutout, and ime all into consideration. This should avoid all possible overlapping. * Add support for using padding instead of margins for insets. This is used for GroupActivity's navigation drawer, where Material design intends for the drawer background to be drawn behind system bars. Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>