Fix toolbar overlap with cutouts in recipient preferences.

Fixes #9323
This commit is contained in:
Greyson Parrelli
2020-01-07 12:00:44 -05:00
parent b449fceca0
commit d9c78e5c3e
2 changed files with 7 additions and 2 deletions

View File

@@ -209,6 +209,11 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
getWindow().setStatusBarColor(Color.TRANSPARENT);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.recipient_preference_root), (v, insets) -> {
ViewUtil.setTopMargin(toolbar, insets.getSystemWindowInsetTop());
return insets;
});
}
}