BlockedContactsActivity: properly implement edge-to-edge

This commit is contained in:
adbenitez
2025-11-26 03:14:43 +01:00
parent ceea00e2cc
commit 553610cfa4
2 changed files with 10 additions and 6 deletions
@@ -33,7 +33,6 @@ public class BlockedContactsActivity extends PassphraseRequiredActionBarActivity
setContentView(R.layout.activity_blocked_contacts);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle(R.string.pref_blocked_contacts);
getSupportActionBar().setElevation(0); // TODO: use custom toolbar instead
initFragment(R.id.fragment, new BlockedAndShareContactsFragment(), getIntent().getExtras());
}
@@ -60,6 +59,12 @@ public class BlockedContactsActivity extends PassphraseRequiredActionBarActivity
View view = inflater.inflate(R.layout.contact_selection_list_fragment, container, false);
recyclerView = ViewUtil.findById(view, R.id.recycler_view);
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
// allow content to be drawn behind the navigation bar
recyclerView.setClipToPadding(false);
// add padding to avoid content hidden behind system bars
ViewUtil.applyWindowInsets(recyclerView);
emptyStateView = ViewUtil.findById(view, android.R.id.empty);
emptyStateView.setText(R.string.blocked_empty_hint);
return view;
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="?attr/colorPrimary"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/status_bar_background"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/windowBackground"
android:id="@+id/fragment" />
</RelativeLayout>
</FrameLayout>