Updated to support lib 23.3
This commit is contained in:
parent
c52e1ce6fd
commit
dd9ed7390d
8 changed files with 52 additions and 54 deletions
|
|
@ -10,7 +10,6 @@ import android.os.AsyncTask;
|
|||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.ColorInt;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.CardView;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
|
|
@ -34,7 +33,6 @@ import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils;
|
|||
import com.kabouzeid.appthemehelper.ThemeStore;
|
||||
import com.kabouzeid.appthemehelper.util.ATHUtil;
|
||||
import com.kabouzeid.appthemehelper.util.ColorUtil;
|
||||
import com.kabouzeid.appthemehelper.util.TintHelper;
|
||||
import com.kabouzeid.appthemehelper.util.ToolbarContentTintHelper;
|
||||
import com.kabouzeid.gramophone.R;
|
||||
import com.kabouzeid.gramophone.adapter.base.MediaEntryViewHolder;
|
||||
|
|
@ -287,7 +285,7 @@ public class PlayerFragment extends AbsPlayerFragment implements PlayerAlbumCove
|
|||
if (activity != null) {
|
||||
int res = isFavorite ? R.drawable.ic_favorite_white_24dp : R.drawable.ic_favorite_border_white_24dp;
|
||||
int color = ToolbarContentTintHelper.toolbarContentColor(activity, Color.TRANSPARENT);
|
||||
Drawable drawable = TintHelper.createTintedDrawable(ContextCompat.getDrawable(activity, res), color);
|
||||
Drawable drawable = Util.getTintedVectorDrawable(activity, res, color);
|
||||
toolbar.getMenu().findItem(R.id.action_toggle_favorite)
|
||||
.setIcon(drawable)
|
||||
.setTitle(isFavorite ? getString(R.string.action_remove_from_favorites) : getString(R.string.action_add_to_favorites));
|
||||
|
|
@ -332,7 +330,7 @@ public class PlayerFragment extends AbsPlayerFragment implements PlayerAlbumCove
|
|||
if (toolbar != null && activity != null)
|
||||
if (toolbar.getMenu().findItem(R.id.action_show_lyrics) == null) {
|
||||
int color = ToolbarContentTintHelper.toolbarContentColor(activity, Color.TRANSPARENT);
|
||||
Drawable drawable = TintHelper.createTintedDrawable(ContextCompat.getDrawable(activity, R.drawable.ic_comment_text_outline_white_24dp), color);
|
||||
Drawable drawable = Util.getTintedVectorDrawable(activity, R.drawable.ic_comment_text_outline_white_24dp, color);
|
||||
toolbar.getMenu()
|
||||
.add(Menu.NONE, R.id.action_show_lyrics, Menu.NONE, R.string.action_show_lyrics)
|
||||
.setIcon(drawable)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue