File tree Expand file tree Collapse file tree 2 files changed +16
-11
lines changed
lib/java/com/google/android/material Expand file tree Collapse file tree 2 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -123,11 +123,13 @@ public WindowInsetsCompat onApplyWindowInsets(
123123 && !paddingBottomSystemWindowInsets ) {
124124 return insets ;
125125 }
126-
127- Insets systemBarInsets = insets .getInsets (WindowInsetsCompat .Type .systemBars ());
128- Insets cutoutInsets = insets .getInsets (WindowInsetsCompat .Type .displayCutout ());
129- int bottomInset = systemBarInsets .bottom + cutoutInsets .bottom ;
130- int topInset = systemBarInsets .top + cutoutInsets .top ;
126+ Insets systemBarInsets =
127+ insets .getInsets (
128+ WindowInsetsCompat .Type .systemBars ()
129+ | WindowInsetsCompat .Type .displayCutout ()
130+ | WindowInsetsCompat .Type .ime ());
131+ int bottomInset = systemBarInsets .bottom ;
132+ int topInset = systemBarInsets .top ;
131133 int bottomPadding = 0 ;
132134 int topPadding = 0 ;
133135
Original file line number Diff line number Diff line change @@ -127,12 +127,15 @@ public WindowInsetsCompat onApplyWindowInsets(
127127 && !marginBottomSystemWindowInsets ) {
128128 return insets ;
129129 }
130- Insets systemBarInsets = insets .getInsets (WindowInsetsCompat .Type .systemBars ());
131- Insets cutoutInsets = insets .getInsets (WindowInsetsCompat .Type .displayCutout ());
132- bottomMarginWindowInset = systemBarInsets .bottom + cutoutInsets .bottom ;
133- topMarginWindowInset = systemBarInsets .top + cutoutInsets .top ;
134- rightMarginWindowInset = systemBarInsets .right + cutoutInsets .right ;
135- leftMarginWindowInset = systemBarInsets .left + cutoutInsets .left ;
130+ Insets systemBarInsets =
131+ insets .getInsets (
132+ WindowInsetsCompat .Type .systemBars ()
133+ | WindowInsetsCompat .Type .displayCutout ()
134+ | WindowInsetsCompat .Type .ime ());
135+ bottomMarginWindowInset = systemBarInsets .bottom ;
136+ topMarginWindowInset = systemBarInsets .top ;
137+ rightMarginWindowInset = systemBarInsets .right ;
138+ leftMarginWindowInset = systemBarInsets .left ;
136139
137140 updateMargins ();
138141
You can’t perform that action at this time.
0 commit comments