diff --git a/app/src/main/java/org/thoughtcrime/securesms/BaseActionBarActivity.java b/app/src/main/java/org/thoughtcrime/securesms/BaseActionBarActivity.java index 7d82c760cc..51f66ec323 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/BaseActionBarActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/BaseActionBarActivity.java @@ -1,5 +1,6 @@ package org.thoughtcrime.securesms; +import static android.os.Build.VERSION.SDK_INT; import static org.session.libsession.utilities.TextSecurePreferences.SELECTED_ACCENT_COLOR; import android.app.ActivityManager; @@ -18,6 +19,7 @@ import androidx.appcompat.app.AppCompatActivity; import org.session.libsession.utilities.TextSecurePreferences; import org.session.libsession.utilities.dynamiclanguage.DynamicLanguageActivityHelper; import org.session.libsession.utilities.dynamiclanguage.DynamicLanguageContextWrapper; +import org.thoughtcrime.securesms.conversation.v2.WindowUtil; import org.thoughtcrime.securesms.util.ActivityUtilitiesKt; import org.thoughtcrime.securesms.util.ThemeState; import org.thoughtcrime.securesms.util.UiModeUtilities; @@ -92,6 +94,11 @@ public abstract class BaseActionBarActivity extends AppCompatActivity { if (!currentThemeState.equals(ActivityUtilitiesKt.themeState(getPreferences()))) { recreate(); } + + // apply lightStatusBar manually as API 26 does not update properly via applyTheme + // https://issuetracker.google.com/issues/65883460?pli=1 + if (SDK_INT >= 26 && SDK_INT <= 27) WindowUtil.setLightStatusBarFromTheme(this); + if (SDK_INT == 27) WindowUtil.setLightNavigationBarFromTheme(this); } @Override diff --git a/app/src/main/res/values-v27/colors.xml b/app/src/main/res/values-v27/colors.xml new file mode 100644 index 0000000000..5c5e9494f1 --- /dev/null +++ b/app/src/main/res/values-v27/colors.xml @@ -0,0 +1,5 @@ + + + @color/classic_light_6 + @color/ocean_light_7 + diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index d3b9d9b255..196e587cdc 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -60,6 +60,9 @@ #40ffffff #aaffffff + @color/compose_view_background + @color/navigation_bar + @color/navigation_bar @color/gray65 #22000000 diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 2874d42972..43d06ee7ad 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -326,7 +326,7 @@ ?android:textColorPrimary @color/gray27 ?colorPrimary - @color/compose_view_background + @color/navigation_bar @color/classic_dark_1 @style/Classic.Dark.BottomSheet ?android:textColorPrimary @@ -404,7 +404,7 @@ ?android:textColorPrimary @color/gray27 ?colorPrimary - ?colorPrimary + @color/classic_light_navigation_bar @color/classic_light_6 @color/classic_light_5 @color/classic_light_3 @@ -490,7 +490,7 @@ @color/ocean_dark_5 ?colorPrimary @color/default_background_start - @color/compose_view_background + @color/navigation_bar ?colorPrimary ?colorPrimaryDark @color/ocean_dark_3 @@ -570,7 +570,7 @@ @color/ocean_light_2 ?android:textColorPrimary @color/ocean_light_6 - @color/ocean_light_7 + @color/ocean_light_navigation_bar ?colorPrimary @color/default_background_start @color/ocean_light_7