Fix broken Material3 changes on Android 6.

This commit is contained in:
Cody Henthorne
2022-06-28 15:20:19 -04:00
committed by GitHub
parent 105d0c778c
commit 2c700c7e0e
7 changed files with 23 additions and 13 deletions

View File

@@ -2279,7 +2279,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));
WindowUtil.setNavigationBarColor(requireActivity(), getResources().getColor(R.color.conversation_navigation_wallpaper));
} else {
wallpaper.setImageDrawable(null);
wallpaperDim.setVisibility(View.GONE);
@@ -2292,7 +2292,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));
WindowUtil.setNavigationBarColor(requireActivity(), getResources().getColor(R.color.signal_colorBackground));
}
fragment.onWallpaperChanged(chatWallpaper);
messageRequestBottomView.setWallpaperEnabled(chatWallpaper != null);

View File

@@ -443,7 +443,7 @@ public final class ConversationReactionOverlay extends FrameLayout {
WindowUtil.setStatusBarColor(window, barColor);
originalNavigationBarColor = window.getNavigationBarColor();
WindowUtil.setNavigationBarColor(window, barColor);
WindowUtil.setNavigationBarColor(activity, barColor);
if (!ThemeUtil.isDarkTheme(getContext())) {
WindowUtil.clearLightStatusBar(window);
@@ -915,7 +915,7 @@ public final class ConversationReactionOverlay extends FrameLayout {
ValueAnimator navigationBarAnim = ValueAnimator.ofArgb(activity.getWindow().getStatusBarColor(), originalNavigationBarColor);
navigationBarAnim.setDuration(duration);
navigationBarAnim.addUpdateListener(animation -> {
WindowUtil.setNavigationBarColor(activity.getWindow(), (int) animation.getAnimatedValue());
WindowUtil.setNavigationBarColor(activity, (int) animation.getAnimatedValue());
});
animators.add(navigationBarAnim);
}