mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-24 19:00:26 +01:00
Fix navigation bar color issues.
This commit is contained in:
committed by
Greyson Parrelli
parent
ff64f7368b
commit
539a0182e0
@@ -15,7 +15,7 @@ import org.thoughtcrime.securesms.components.reminder.ReminderView
|
|||||||
import org.thoughtcrime.securesms.components.settings.app.subscription.DonationPaymentComponent
|
import org.thoughtcrime.securesms.components.settings.app.subscription.DonationPaymentComponent
|
||||||
import org.thoughtcrime.securesms.components.settings.app.subscription.DonationPaymentRepository
|
import org.thoughtcrime.securesms.components.settings.app.subscription.DonationPaymentRepository
|
||||||
import org.thoughtcrime.securesms.recipients.Recipient
|
import org.thoughtcrime.securesms.recipients.Recipient
|
||||||
import org.thoughtcrime.securesms.util.DynamicNoActionBarTheme
|
import org.thoughtcrime.securesms.util.DynamicNoActionBarTransparentNavigationBarTheme
|
||||||
import org.thoughtcrime.securesms.util.DynamicTheme
|
import org.thoughtcrime.securesms.util.DynamicTheme
|
||||||
import org.thoughtcrime.securesms.util.concurrent.ListenableFuture
|
import org.thoughtcrime.securesms.util.concurrent.ListenableFuture
|
||||||
import org.thoughtcrime.securesms.util.views.Stub
|
import org.thoughtcrime.securesms.util.views.Stub
|
||||||
@@ -24,7 +24,7 @@ open class ConversationActivity : PassphraseRequiredActivity(), ConversationPare
|
|||||||
|
|
||||||
private lateinit var fragment: ConversationParentFragment
|
private lateinit var fragment: ConversationParentFragment
|
||||||
|
|
||||||
private val dynamicTheme: DynamicTheme = DynamicNoActionBarTheme()
|
private val dynamicTheme: DynamicTheme = DynamicNoActionBarTransparentNavigationBarTheme()
|
||||||
override fun onPreCreate() {
|
override fun onPreCreate() {
|
||||||
dynamicTheme.onCreate(this)
|
dynamicTheme.onCreate(this)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2276,9 +2276,6 @@ public class ConversationParentFragment extends Fragment
|
|||||||
int toolbarTextAndIconColor = getResources().getColor(R.color.signal_colorNeutralInverse);
|
int toolbarTextAndIconColor = getResources().getColor(R.color.signal_colorNeutralInverse);
|
||||||
toolbar.setTitleTextColor(toolbarTextAndIconColor);
|
toolbar.setTitleTextColor(toolbarTextAndIconColor);
|
||||||
setToolbarActionItemTint(toolbar, toolbarTextAndIconColor);
|
setToolbarActionItemTint(toolbar, toolbarTextAndIconColor);
|
||||||
|
|
||||||
WindowUtil.setNavigationBarColor(requireActivity().getWindow(), 0);
|
|
||||||
WindowUtil.setLightNavigationBar(requireActivity().getWindow());
|
|
||||||
} else {
|
} else {
|
||||||
wallpaper.setImageDrawable(null);
|
wallpaper.setImageDrawable(null);
|
||||||
wallpaperDim.setVisibility(View.GONE);
|
wallpaperDim.setVisibility(View.GONE);
|
||||||
@@ -2291,9 +2288,6 @@ public class ConversationParentFragment extends Fragment
|
|||||||
int toolbarTextAndIconColor = getResources().getColor(R.color.signal_colorOnSurface);
|
int toolbarTextAndIconColor = getResources().getColor(R.color.signal_colorOnSurface);
|
||||||
toolbar.setTitleTextColor(toolbarTextAndIconColor);
|
toolbar.setTitleTextColor(toolbarTextAndIconColor);
|
||||||
setToolbarActionItemTint(toolbar, toolbarTextAndIconColor);
|
setToolbarActionItemTint(toolbar, toolbarTextAndIconColor);
|
||||||
|
|
||||||
WindowUtil.setNavigationBarColor(requireActivity().getWindow(), ContextCompat.getColor(requireContext(), R.color.signal_colorBackground));
|
|
||||||
WindowUtil.setLightNavigationBarFromTheme(requireActivity());
|
|
||||||
}
|
}
|
||||||
fragment.onWallpaperChanged(chatWallpaper);
|
fragment.onWallpaperChanged(chatWallpaper);
|
||||||
messageRequestBottomView.setWallpaperEnabled(chatWallpaper != null);
|
messageRequestBottomView.setWallpaperEnabled(chatWallpaper != null);
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package org.thoughtcrime.securesms.util;
|
||||||
|
|
||||||
|
import androidx.annotation.StyleRes;
|
||||||
|
|
||||||
|
import org.thoughtcrime.securesms.R;
|
||||||
|
|
||||||
|
public class DynamicNoActionBarTransparentNavigationBarTheme extends DynamicTheme {
|
||||||
|
|
||||||
|
protected @StyleRes int getTheme() {
|
||||||
|
return R.style.Signal_DayNight_NoActionBar_TransparentNavigationBar;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
<style name="Signal.DayNight.NoActionBar" parent="TextSecure.DarkNoActionBar" />
|
<style name="Signal.DayNight.NoActionBar" parent="TextSecure.DarkNoActionBar" />
|
||||||
|
|
||||||
|
<style name="Signal.DayNight.NoActionBar.TransparentNavigationBar" parent="TextSecure.DarkNoActionBar.TransparentNavigationBar" />
|
||||||
|
|
||||||
<style name="Signal.DayNight.Invite" parent="Signal.NoActionBar.Invite" />
|
<style name="Signal.DayNight.Invite" parent="Signal.NoActionBar.Invite" />
|
||||||
|
|
||||||
<style name="Signal.DayNight.IntroTheme" parent="TextSecure.DarkIntroTheme" />
|
<style name="Signal.DayNight.IntroTheme" parent="TextSecure.DarkIntroTheme" />
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<style name="TextSecure.LightTheme" parent="TextSecure.BaseLightTheme">
|
<style name="TextSecure.LightTheme" parent="TextSecure.BaseLightTheme">
|
||||||
<item name="android:statusBarColor">@color/core_grey_60</item>
|
<item name="android:statusBarColor">@color/core_grey_60</item>
|
||||||
@@ -85,4 +85,14 @@
|
|||||||
|
|
||||||
<style name="Signal.ConversationSettings.WindowAnimation" parent="android:style/Animation" >
|
<style name="Signal.ConversationSettings.WindowAnimation" parent="android:style/Animation" >
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="TextSecure.LightNoActionBar.TransparentNavigationBar">
|
||||||
|
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||||
|
<item name="android:enforceNavigationBarContrast" tools:ignore="NewApi">false</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="TextSecure.DarkNoActionBar.TransparentNavigationBar">
|
||||||
|
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||||
|
<item name="android:enforceNavigationBarContrast" tools:ignore="NewApi">false</item>
|
||||||
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
<style name="Signal.DayNight.NoActionBar" parent="TextSecure.LightNoActionBar" />
|
<style name="Signal.DayNight.NoActionBar" parent="TextSecure.LightNoActionBar" />
|
||||||
|
|
||||||
|
<style name="Signal.DayNight.NoActionBar.TransparentNavigationBar" parent="TextSecure.LightNoActionBar.TransparentNavigationBar" />
|
||||||
|
|
||||||
<style name="Signal.DayNight.Invite" parent="Signal.Light.NoActionBar.Invite" />
|
<style name="Signal.DayNight.Invite" parent="Signal.Light.NoActionBar.Invite" />
|
||||||
|
|
||||||
<style name="Signal.DayNight.IntroTheme" parent="TextSecure.LightIntroTheme" />
|
<style name="Signal.DayNight.IntroTheme" parent="TextSecure.LightIntroTheme" />
|
||||||
|
|||||||
@@ -20,6 +20,14 @@
|
|||||||
<!-- leave empty to allow overriding -->
|
<!-- leave empty to allow overriding -->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="TextSecure.LightNoActionBar.TransparentNavigationBar">
|
||||||
|
<!-- leave empty to allow overriding -->
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="TextSecure.DarkNoActionBar.TransparentNavigationBar">
|
||||||
|
<!-- leave empty to allow overriding -->
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="TextSecure.BaseLightNoActionBar" parent="@style/TextSecure.LightTheme">
|
<style name="TextSecure.BaseLightNoActionBar" parent="@style/TextSecure.LightTheme">
|
||||||
<item name="windowActionBar">false</item>
|
<item name="windowActionBar">false</item>
|
||||||
<item name="windowNoTitle">true</item>
|
<item name="windowNoTitle">true</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user