Merge branch 'dev' into ktxExtensions
This commit is contained in:
commit
9bd15ed5c4
20 changed files with 40 additions and 63 deletions
|
@ -9,8 +9,6 @@ import android.view.View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
|
|||
import android.view.WindowInsetsController
|
||||
import android.view.WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS
|
||||
import androidx.annotation.ColorInt
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.core.view.WindowInsetsControllerCompat
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
import code.name.monkey.appthemehelper.util.TintHelper
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
|
|
|
@ -8,8 +8,6 @@ import androidx.preference.PreferenceFragmentCompat;
|
|||
import code.name.monkey.appthemehelper.common.prefs.supportv7.dialogs.ATEListPreferenceDialogFragmentCompat;
|
||||
import code.name.monkey.appthemehelper.common.prefs.supportv7.dialogs.ATEPreferenceDialogFragment;
|
||||
|
||||
import static androidx.preference.PreferenceFragmentCompat.*;
|
||||
|
||||
/**
|
||||
* @author Karim Abou Zeid (kabouzeid)
|
||||
*/
|
||||
|
|
|
@ -96,8 +96,8 @@ public final class TintHelper {
|
|||
return null;
|
||||
}
|
||||
drawable = DrawableCompat.wrap(drawable.mutate());
|
||||
DrawableCompat.setTintMode(drawable, PorterDuff.Mode.SRC_IN);
|
||||
DrawableCompat.setTint(drawable, color);
|
||||
drawable.setTintMode(PorterDuff.Mode.SRC_IN);
|
||||
drawable.setTint(color);
|
||||
return drawable;
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ public final class TintHelper {
|
|||
return null;
|
||||
}
|
||||
Drawable temp = DrawableCompat.wrap(drawable.mutate());
|
||||
DrawableCompat.setTintList(temp, sl);
|
||||
temp.setTintList(sl);
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
|
|
@ -550,7 +550,7 @@ public final class ToolbarContentTintHelper {
|
|||
|
||||
if (toolbar != null && toolbar.getOverflowIcon() != null) {
|
||||
Drawable bg = DrawableCompat.wrap(toolbar.getOverflowIcon());
|
||||
DrawableCompat.setTint(bg, toolbarIconsColor);
|
||||
bg.setTint(toolbarIconsColor);
|
||||
}
|
||||
removeOnGlobalLayoutListener(decorView, this);
|
||||
}
|
||||
|
@ -588,7 +588,7 @@ public final class ToolbarContentTintHelper {
|
|||
if (drawable != null) {
|
||||
final Drawable wrapped = DrawableCompat.wrap(drawable);
|
||||
drawable.mutate();
|
||||
DrawableCompat.setTint(wrapped, color);
|
||||
wrapped.setTint(color);
|
||||
item.setIcon(drawable);
|
||||
}
|
||||
}
|
||||
|
@ -603,7 +603,7 @@ public final class ToolbarContentTintHelper {
|
|||
final Drawable drawable = image.getDrawable();
|
||||
final Drawable wrapped = DrawableCompat.wrap(drawable);
|
||||
drawable.mutate();
|
||||
DrawableCompat.setTint(wrapped, color);
|
||||
wrapped.setTint(color);
|
||||
image.setImageDrawable(drawable);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue