diff --git a/ttrssreader/src/fdroid/java/org/ttrssreader/gui/MenuFlavorActivity.java b/ttrssreader/src/fdroid/java/org/ttrssreader/gui/MenuFlavorActivity.java index 8adc0baf..5faf22e2 100644 --- a/ttrssreader/src/fdroid/java/org/ttrssreader/gui/MenuFlavorActivity.java +++ b/ttrssreader/src/fdroid/java/org/ttrssreader/gui/MenuFlavorActivity.java @@ -18,6 +18,9 @@ package org.ttrssreader.gui; +import android.os.Bundle; +import org.ttrssreader.R; + import androidx.appcompat.app.AppCompatActivity; /** @@ -25,4 +28,11 @@ */ public abstract class MenuFlavorActivity extends AppCompatActivity { + @Override + protected void onCreate(Bundle instance) { + // Call before the DecorView is accessed in setContentView, see https://medium.com/androiddevelopers/insets-handling-tips-for-android-15s-edge-to-edge-enforcement-872774e8839b + getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false); + + super.onCreate(instance); + } } diff --git a/ttrssreader/src/main/java/org/ttrssreader/gui/AboutActivity.java b/ttrssreader/src/main/java/org/ttrssreader/gui/AboutActivity.java index 1a6b5c65..19300c57 100755 --- a/ttrssreader/src/main/java/org/ttrssreader/gui/AboutActivity.java +++ b/ttrssreader/src/main/java/org/ttrssreader/gui/AboutActivity.java @@ -34,7 +34,7 @@ import static org.ttrssreader.R.id.AboutActivity_ThanksText; -public class AboutActivity extends Activity { +public class AboutActivity extends MenuFlavorActivity { // private static final String TAG = AboutActivity.class.getSimpleName(); diff --git a/ttrssreader/src/main/java/org/ttrssreader/gui/EditPluginActivity.java b/ttrssreader/src/main/java/org/ttrssreader/gui/EditPluginActivity.java index 1b562e7a..4e969429 100755 --- a/ttrssreader/src/main/java/org/ttrssreader/gui/EditPluginActivity.java +++ b/ttrssreader/src/main/java/org/ttrssreader/gui/EditPluginActivity.java @@ -36,8 +36,12 @@ public final class EditPluginActivity extends AbstractPluginActivity { @Override protected void onCreate(final Bundle savedInstanceState) { - super.onCreate(savedInstanceState); setTheme(Controller.getInstance().getThemeResource()); + + // Call before the DecorView is accessed in setContentView, see https://medium.com/androiddevelopers/insets-handling-tips-for-android-15s-edge-to-edge-enforcement-872774e8839b + getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false); + + super.onCreate(savedInstanceState); Controller.getInstance().initializeThemeMode(); mDamageReport.initialize(); setContentView(R.layout.localeplugin); diff --git a/ttrssreader/src/main/java/org/ttrssreader/gui/MediaPlayerActivity.java b/ttrssreader/src/main/java/org/ttrssreader/gui/MediaPlayerActivity.java index a8836bac..43f93aba 100755 --- a/ttrssreader/src/main/java/org/ttrssreader/gui/MediaPlayerActivity.java +++ b/ttrssreader/src/main/java/org/ttrssreader/gui/MediaPlayerActivity.java @@ -27,7 +27,7 @@ import org.ttrssreader.controllers.Controller; import org.ttrssreader.utils.PostMortemReportExceptionHandler; -public class MediaPlayerActivity extends Activity { +public class MediaPlayerActivity extends MenuFlavorActivity { // private static final String TAG = MediaPlayerActivity.class.getSimpleName(); diff --git a/ttrssreader/src/main/java/org/ttrssreader/preferences/PreferencesActivity.java b/ttrssreader/src/main/java/org/ttrssreader/preferences/PreferencesActivity.java index b4b30920..d9a776f3 100644 --- a/ttrssreader/src/main/java/org/ttrssreader/preferences/PreferencesActivity.java +++ b/ttrssreader/src/main/java/org/ttrssreader/preferences/PreferencesActivity.java @@ -23,6 +23,7 @@ import org.ttrssreader.R; import org.ttrssreader.controllers.Controller; +import org.ttrssreader.gui.MenuFlavorActivity; import org.ttrssreader.preferences.fragments.PreferencesFragment; import org.ttrssreader.utils.AsyncTask; import org.ttrssreader.utils.PostMortemReportExceptionHandler; @@ -38,7 +39,7 @@ import androidx.preference.PreferenceFragmentCompat; import androidx.preference.PreferenceManager; -public class PreferencesActivity extends AppCompatActivity implements PreferenceFragmentCompat.OnPreferenceStartFragmentCallback { +public class PreferencesActivity extends MenuFlavorActivity implements PreferenceFragmentCompat.OnPreferenceStartFragmentCallback { // private static final String TAG = PreferencesActivity.class.getSimpleName(); diff --git a/ttrssreader/src/main/res/values/values.xml b/ttrssreader/src/main/res/values-v35/styles.xml similarity index 62% rename from ttrssreader/src/main/res/values/values.xml rename to ttrssreader/src/main/res/values-v35/styles.xml index b6247692..efaa3999 100644 --- a/ttrssreader/src/main/res/values/values.xml +++ b/ttrssreader/src/main/res/values-v35/styles.xml @@ -1,6 +1,5 @@ - + - diff --git a/ttrssreader/src/main/res/values/styles.xml b/ttrssreader/src/main/res/values/styles.xml index 28c408d6..dd187fe2 100755 --- a/ttrssreader/src/main/res/values/styles.xml +++ b/ttrssreader/src/main/res/values/styles.xml @@ -28,5 +28,7 @@ @drawable/splash + diff --git a/ttrssreader/src/play/java/org/ttrssreader/gui/MenuFlavorActivity.java b/ttrssreader/src/play/java/org/ttrssreader/gui/MenuFlavorActivity.java index aec855c6..a63824d8 100644 --- a/ttrssreader/src/play/java/org/ttrssreader/gui/MenuFlavorActivity.java +++ b/ttrssreader/src/play/java/org/ttrssreader/gui/MenuFlavorActivity.java @@ -42,6 +42,9 @@ public abstract class MenuFlavorActivity extends AppCompatActivity implements Pr @Override protected void onCreate(Bundle instance) { + // Call before the DecorView is accessed in setContentView, see https://medium.com/androiddevelopers/insets-handling-tips-for-android-15s-edge-to-edge-enforcement-872774e8839b + getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false); + super.onCreate(instance); if (Controller.getInstance().useProviderInstaller()) ProviderInstaller.installIfNeededAsync(this, this);