mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Pad bottom of settings list view with bottom system insets
This change allows for a transparent navigation bar in the settings Material next redesign. Test: Bottom of settings not cut off by bottom navigation bar Bug: 187732263 Change-Id: I237011003ca0c3760c0fbdbb2865ef90c19d7b81
This commit is contained in:
@@ -152,6 +152,17 @@ public class DeveloperOptionsFragment extends PreferenceFragmentCompat {
|
||||
filterPreferences(query, mPreferenceScreen);
|
||||
}
|
||||
});
|
||||
|
||||
View listView = getListView();
|
||||
final int bottomPadding = listView.getPaddingBottom();
|
||||
listView.setOnApplyWindowInsetsListener((v, insets) -> {
|
||||
v.setPadding(
|
||||
v.getPaddingLeft(),
|
||||
v.getPaddingTop(),
|
||||
v.getPaddingRight(),
|
||||
bottomPadding + insets.getSystemWindowInsetBottom());
|
||||
return insets.consumeSystemWindowInsets();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user