mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
Fix status and nav bar colors (#1165)
This commit is contained in:
parent
63d442584c
commit
7d33177e06
@ -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
|
||||
|
5
app/src/main/res/values-v27/colors.xml
Normal file
5
app/src/main/res/values-v27/colors.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="classic_light_navigation_bar">@color/classic_light_6</color>
|
||||
<color name="ocean_light_navigation_bar">@color/ocean_light_7</color>
|
||||
</resources>
|
@ -60,6 +60,9 @@
|
||||
<color name="transparent_white_40">#40ffffff</color>
|
||||
<color name="transparent_white_aa">#aaffffff</color>
|
||||
|
||||
<color name="navigation_bar">@color/compose_view_background</color>
|
||||
<color name="classic_light_navigation_bar">@color/navigation_bar</color>
|
||||
<color name="ocean_light_navigation_bar">@color/navigation_bar</color>
|
||||
<color name="action_mode_status_bar">@color/gray65</color>
|
||||
<color name="touch_highlight">#22000000</color>
|
||||
|
||||
|
@ -326,7 +326,7 @@
|
||||
<item name="android:textColor">?android:textColorPrimary</item>
|
||||
<item name="android:textColorHint">@color/gray27</item>
|
||||
<item name="android:windowBackground">?colorPrimary</item>
|
||||
<item name="android:navigationBarColor">@color/compose_view_background</item>
|
||||
<item name="android:navigationBarColor">@color/navigation_bar</item>
|
||||
<item name="dialog_background_color">@color/classic_dark_1</item>
|
||||
<item name="bottomSheetDialogTheme">@style/Classic.Dark.BottomSheet</item>
|
||||
<item name="actionMenuTextColor">?android:textColorPrimary</item>
|
||||
@ -404,7 +404,7 @@
|
||||
<item name="android:textColor">?android:textColorPrimary</item>
|
||||
<item name="android:textColorHint">@color/gray27</item>
|
||||
<item name="android:windowBackground">?colorPrimary</item>
|
||||
<item name="android:navigationBarColor">?colorPrimary</item>
|
||||
<item name="android:navigationBarColor">@color/classic_light_navigation_bar</item>
|
||||
<item name="colorCellBackground">@color/classic_light_6</item>
|
||||
<item name="colorSettingsBackground">@color/classic_light_5</item>
|
||||
<item name="colorDividerBackground">@color/classic_light_3</item>
|
||||
@ -490,7 +490,7 @@
|
||||
<item name="android:textColorHint">@color/ocean_dark_5</item>
|
||||
<item name="android:windowBackground">?colorPrimary</item>
|
||||
<item name="android:colorBackground">@color/default_background_start</item>
|
||||
<item name="android:navigationBarColor">@color/compose_view_background</item>
|
||||
<item name="android:navigationBarColor">@color/navigation_bar</item>
|
||||
<item name="default_background_end">?colorPrimary</item>
|
||||
<item name="default_background_start">?colorPrimaryDark</item>
|
||||
<item name="colorCellBackground">@color/ocean_dark_3</item>
|
||||
@ -570,7 +570,7 @@
|
||||
<item name="android:textColorTertiary">@color/ocean_light_2</item>
|
||||
<item name="android:textColor">?android:textColorPrimary</item>
|
||||
<item name="android:textColorHint">@color/ocean_light_6</item>
|
||||
<item name="android:navigationBarColor">@color/ocean_light_7</item>
|
||||
<item name="android:navigationBarColor">@color/ocean_light_navigation_bar</item>
|
||||
<item name="android:windowBackground">?colorPrimary</item>
|
||||
<item name="android:colorBackground">@color/default_background_start</item>
|
||||
<item name="default_background_end">@color/ocean_light_7</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user