Fixed keyboard inset

This commit is contained in:
Marcel Bokhorst 2024-05-26 11:58:02 +02:00 committed by GitHub
parent ce80f00313
commit 6755e03d40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View File

@ -170,10 +170,9 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
mlp.bottomMargin = insets.bottom;
v.setLayoutParams(mlp);
if (ActivityBase.this instanceof ActivityCompose) {
int bottom = windowInsets.getInsets(WindowInsetsCompat.Type.ime()).bottom;
v.setPaddingRelative(0, 0, 0, bottom - insets.bottom);
}
int bottom = windowInsets.getInsets(WindowInsetsCompat.Type.ime()).bottom;
int pad = bottom - insets.bottom;
v.setPaddingRelative(0, 0, 0, pad < 0 ? 0 : pad);
if (edge_to_edge)
for (View child : Helper.getViewsWithTag(v, "inset")) {