Review
This commit is contained in:
parent
e30e2e1034
commit
edb4dc19e0
2 changed files with 6 additions and 7 deletions
|
@ -6,7 +6,6 @@ import android.content.DialogInterface;
|
|||
import android.content.res.TypedArray;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
|
@ -23,7 +22,6 @@ import androidx.annotation.NonNull;
|
|||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.widget.PopupMenu;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
|
@ -228,7 +226,6 @@ public class PluginsFragment extends BaseOsmAndFragment implements PluginStateLi
|
|||
int color = AndroidUtils.getColorFromAttr(context, R.attr.list_background_color);
|
||||
|
||||
Drawable pluginIcon = plugin.getLogoResource();
|
||||
pluginIcon.clearColorFilter();
|
||||
pluginLogo.setImageDrawable(UiUtilities.tintDrawable(pluginIcon, color));
|
||||
pluginLogo.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -2,7 +2,6 @@ package net.osmand.plus.dialogs;
|
|||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
|
@ -91,8 +90,11 @@ public class PluginInstalledBottomSheetDialog extends MenuBottomSheetDialogFragm
|
|||
SpannableString pluginTitleSpan = new SpannableString(plugin.getName());
|
||||
pluginTitleSpan.setSpan(new CustomTypefaceSpan(typeface), 0, pluginTitleSpan.length(), 0);
|
||||
Drawable pluginIcon = plugin.getLogoResource();
|
||||
pluginIcon.setColorFilter(ContextCompat.getColor(
|
||||
context, nightMode ? R.color.icon_color_default_light : R.color.icon_color_default_dark), PorterDuff.Mode.MULTIPLY);
|
||||
if (pluginIcon.getConstantState() != null) {
|
||||
pluginIcon = pluginIcon.getConstantState().newDrawable().mutate();
|
||||
}
|
||||
pluginIcon = UiUtilities.tintDrawable(pluginIcon, ContextCompat.getColor(
|
||||
context, nightMode ? R.color.icon_color_default_light : R.color.icon_color_default_dark));
|
||||
|
||||
BaseBottomSheetItem pluginTitle = new SimpleBottomSheetItem.Builder()
|
||||
.setTitle(pluginTitleSpan)
|
||||
|
|
Loading…
Reference in a new issue