mirror of
https://gitlab.com/oeffi/oeffi.git
synced 2025-07-07 15:58:49 +00:00
PreferenceActivity: fix broken edge-to-edge layout in settings
This commit is contained in:
parent
2e00027604
commit
b5dac623dd
1 changed files with 11 additions and 0 deletions
|
@ -19,6 +19,7 @@ package de.schildbach.oeffi.preference;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import de.schildbach.oeffi.R;
|
import de.schildbach.oeffi.R;
|
||||||
|
|
||||||
|
@ -35,6 +36,16 @@ public class PreferenceActivity extends android.preference.PreferenceActivity {
|
||||||
activity.startActivity(intent);
|
activity.startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(final Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
findViewById(android.R.id.content).setOnApplyWindowInsetsListener((v, insets) -> {
|
||||||
|
v.setPadding(v.getPaddingLeft(), insets.getSystemWindowInsetTop(), v.getPaddingRight(),
|
||||||
|
v.getPaddingBottom());
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBuildHeaders(final List<Header> target) {
|
public void onBuildHeaders(final List<Header> target) {
|
||||||
loadHeadersFromResource(R.xml.preference_headers, target);
|
loadHeadersFromResource(R.xml.preference_headers, target);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue