From 80a4a3551c79f38d3b6bb7768872c4bf4b74595d Mon Sep 17 00:00:00 2001 From: sk Date: Thu, 22 Dec 2022 01:09:46 +0100 Subject: [PATCH] match navigation bar color with toolbar --- .../org/joinmastodon/android/fragments/ComposeFragment.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java index 06582edf0..7ffa277ef 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java @@ -203,10 +203,14 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr private String language; private MastodonLanguage.LanguageResolver languageResolver; + private int navigationBarColorBefore; + @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setRetainInstance(true); + navigationBarColorBefore = getActivity().getWindow().getNavigationBarColor(); + getActivity().getWindow().setNavigationBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorBackgroundLightest)); accountID=getArguments().getString("account"); AccountSession session=AccountSessionManager.getInstance().getAccount(accountID); @@ -248,6 +252,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr UiUtils.removeCallbacks(updateUploadEtaRunnable); updateUploadEtaRunnable=null; } + getActivity().getWindow().setNavigationBarColor(navigationBarColorBefore); } @Override