Custom tabs improvements

This commit is contained in:
M66B 2020-01-05 12:52:21 +01:00
parent 92f3003a7b
commit 229d3b4245
1 changed files with 4 additions and 1 deletions

View File

@ -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 {