Rebased with master and conflicts resolved

This commit is contained in:
Kumar 2022-05-03 16:02:19 +05:30 committed by A117870935
parent e50cca657a
commit 33294957fb
3 changed files with 8 additions and 6 deletions

View file

@ -2,9 +2,11 @@
* Nextcloud Android client application
*
* @author Andy Scherzinger
* @author TSI-mc
* Copyright (C) 2016 Andy Scherzinger
* Copyright (C) 2016 Nextcloud
* Copyright (C) 2016 ownCloud Inc.
* Copyright (C) 2022 TSI-mc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
@ -294,6 +296,6 @@ public abstract class ToolbarActivity extends BaseActivity implements Injectable
}
ActionBar actionBar = getSupportActionBar();
ThemeToolbarUtils.setColoredSubtitle(actionBar, subtitle, this);
themeToolbarUtils.setColoredSubtitle(actionBar, subtitle, this);
}
}

View file

@ -76,6 +76,8 @@ public class GalleryFragment extends OCFileListFragment implements GalleryFragme
private GalleryFragmentBottomSheetDialog galleryFragmentBottomSheetDialog;
@Inject AppPreferences appPreferences;
@Inject ThemeColorUtils themeColorUtils;
@Inject ThemeMenuUtils themeMenuUtils;
@Override
public void onCreate(Bundle savedInstanceState) {
@ -277,8 +279,8 @@ public class GalleryFragment extends OCFileListFragment implements GalleryFragme
MenuItem menuItem = menu.findItem(R.id.action_three_dot_icon);
if (menuItem != null) {
ThemeMenuUtils.tintMenuIcon(requireContext(), menuItem,
ThemeColorUtils.appBarPrimaryFontColor(requireContext()));
themeMenuUtils.tintMenuIcon(menuItem,
themeColorUtils.appBarPrimaryFontColor(requireContext()));
}
}

View file

@ -24,7 +24,6 @@
*/
package com.owncloud.android.utils.theme;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.text.Spannable;
import android.text.SpannableString;
@ -54,11 +53,10 @@ public final class ThemeMenuUtils {
/**
* tinting menu item color
*
* @param context
* @param item the menu item object
* @param color the color wanted as a color resource
*/
public static void tintMenuIcon(@NonNull Context context, @NonNull MenuItem item, int color) {
public void tintMenuIcon(@NonNull MenuItem item, int color) {
Drawable normalDrawable = item.getIcon();
Drawable wrapDrawable = DrawableCompat.wrap(normalDrawable);
DrawableCompat.setTint(wrapDrawable, color);