Skip to content

Commit

Permalink
apply insets when device rotated
Browse files Browse the repository at this point in the history
  • Loading branch information
jamie-mh committed Sep 11, 2023
1 parent ac882b7 commit 7369ed0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions AuthenticatorPro.Droid/src/Activity/BaseActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@ public WindowInsetsCompat OnApplyWindowInsets(View view, WindowInsetsCompat inse
}

var systemBarInsets = insets.GetInsets(WindowInsetsCompat.Type.SystemBars());

var layoutParameters = (ViewGroup.MarginLayoutParams) view.LayoutParameters;
layoutParameters.LeftMargin = systemBarInsets.Left;
layoutParameters.RightMargin = systemBarInsets.Right;
view.LayoutParameters = layoutParameters;

OnApplySystemBarInsets(systemBarInsets);
_appliedSystemBarInsets = true;

Expand Down

0 comments on commit 7369ed0

Please sign in to comment.