Manually set nav bar background to 50 transparent black with wallpaper.

This commit is contained in:
Alex Hart
2022-06-21 16:48:03 -03:00
parent 3cecd503ab
commit 852989ce48
5 changed files with 6 additions and 14 deletions

View File

@@ -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.DonationPaymentRepository
import org.thoughtcrime.securesms.recipients.Recipient
import org.thoughtcrime.securesms.util.DynamicNoActionBarTransparentNavigationBarTheme
import org.thoughtcrime.securesms.util.DynamicNoActionBarTheme
import org.thoughtcrime.securesms.util.DynamicTheme
import org.thoughtcrime.securesms.util.concurrent.ListenableFuture
import org.thoughtcrime.securesms.util.views.Stub
@@ -24,7 +24,7 @@ open class ConversationActivity : PassphraseRequiredActivity(), ConversationPare
private lateinit var fragment: ConversationParentFragment
private val dynamicTheme: DynamicTheme = DynamicNoActionBarTransparentNavigationBarTheme()
private val dynamicTheme: DynamicTheme = DynamicNoActionBarTheme()
override fun onPreCreate() {
dynamicTheme.onCreate(this)
}

View File

@@ -2281,6 +2281,7 @@ public class ConversationParentFragment extends Fragment
int toolbarTextAndIconColor = getResources().getColor(R.color.signal_colorNeutralInverse);
toolbar.setTitleTextColor(toolbarTextAndIconColor);
setToolbarActionItemTint(toolbar, toolbarTextAndIconColor);
WindowUtil.setNavigationBarColor(requireActivity().getWindow(), getResources().getColor(R.color.conversation_navigation_wallpaper));
} else {
wallpaper.setImageDrawable(null);
wallpaperDim.setVisibility(View.GONE);
@@ -2293,6 +2294,7 @@ public class ConversationParentFragment extends Fragment
int toolbarTextAndIconColor = getResources().getColor(R.color.signal_colorOnSurface);
toolbar.setTitleTextColor(toolbarTextAndIconColor);
setToolbarActionItemTint(toolbar, toolbarTextAndIconColor);
WindowUtil.setNavigationBarColor(requireActivity().getWindow(), getResources().getColor(R.color.signal_colorBackground));
}
fragment.onWallpaperChanged(chatWallpaper);
messageRequestBottomView.setWallpaperEnabled(chatWallpaper != null);

View File

@@ -1,12 +0,0 @@
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;
}
}

View File

@@ -102,6 +102,7 @@
<color name="conversation_item_sent_view_once_opened">@color/transparent_white_80</color>
<color name="conversation_typing_indicator_foreground_tint_normal">@color/signal_colorOnSurfaceVariant</color>
<color name="conversation_typing_indicator_foreground_tint_wallpaper">@color/signal_colorNeutralVariantInverse</color>
<color name="conversation_navigation_wallpaper">#80000000</color>
<color name="wallpaper_bubble_color">@color/signal_colorTransparentInverse4</color>

View File

@@ -104,6 +104,7 @@
<color name="conversation_item_sent_view_once_opened">@color/transparent_white_90</color>
<color name="conversation_typing_indicator_foreground_tint_normal">@color/signal_colorOnSurfaceVariant</color>
<color name="conversation_typing_indicator_foreground_tint_wallpaper">@color/signal_colorNeutralVariantInverse</color>
<color name="conversation_navigation_wallpaper">#80FFFFFF</color>
<color name="wallpaper_bubble_color">@color/signal_colorTransparent4</color>
<color name="sticky_header_foreground_wallpaper">@color/signal_colorNeutralVariantInverse</color>