From 229d3b4245dbd04c4828ad188189643884cf4923 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 5 Jan 2020 12:52:21 +0100 Subject: [PATCH] Custom tabs improvements --- app/src/main/java/eu/faircode/email/Helper.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index 25b2c7e064..9c836a5ef5 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -271,8 +271,11 @@ public class Helper { } else { // https://developer.chrome.com/multidevice/android/customtabs CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); - builder.setNavigationBarColor(resolveColor(context, R.attr.colorPrimaryDark)); builder.setToolbarColor(resolveColor(context, R.attr.colorPrimary)); + builder.setSecondaryToolbarColor(resolveColor(context, R.attr.colorPrimaryDark)); + builder.setColorScheme(Helper.isDarkTheme(context) + ? CustomTabsIntent.COLOR_SCHEME_DARK : CustomTabsIntent.COLOR_SCHEME_LIGHT); + builder.addDefaultShareMenuItem(); CustomTabsIntent customTabsIntent = builder.build(); try {