update shortcut overrides and other code changes
This commit is contained in:
parent
fc6a71b2c0
commit
d8d5b97d4b
29 changed files with 55 additions and 51 deletions
|
|
@ -5,11 +5,11 @@ import android.view.LayoutInflater;
|
|||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.LayoutRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.dkanada.gramophone.R;
|
||||
import com.dkanada.gramophone.adapter.base.MediaEntryViewHolder;
|
||||
import com.dkanada.gramophone.glide.CustomGlideRequest;
|
||||
import com.dkanada.gramophone.glide.CustomPaletteTarget;
|
||||
|
|
@ -24,12 +24,9 @@ public class GenreAdapter extends RecyclerView.Adapter<GenreAdapter.ViewHolder>
|
|||
private final AppCompatActivity activity;
|
||||
private List<Genre> dataSet;
|
||||
|
||||
private int itemLayoutRes;
|
||||
|
||||
public GenreAdapter(@NonNull AppCompatActivity activity, List<Genre> dataSet, @LayoutRes int itemLayoutRes) {
|
||||
public GenreAdapter(@NonNull AppCompatActivity activity, List<Genre> dataSet) {
|
||||
this.activity = activity;
|
||||
this.dataSet = dataSet;
|
||||
this.itemLayoutRes = itemLayoutRes;
|
||||
}
|
||||
|
||||
public List<Genre> getDataSet() {
|
||||
|
|
@ -49,7 +46,7 @@ public class GenreAdapter extends RecyclerView.Adapter<GenreAdapter.ViewHolder>
|
|||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(activity).inflate(itemLayoutRes, parent, false);
|
||||
View view = LayoutInflater.from(activity).inflate(R.layout.item_list_single_row, parent, false);
|
||||
|
||||
return new ViewHolder(view);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ public class PlaylistAdapter extends AbsMultiSelectAdapter<PlaylistAdapter.ViewH
|
|||
protected void onMultipleItemAction(@NonNull MenuItem menuItem, @NonNull List<Playlist> selection) {
|
||||
switch (menuItem.getItemId()) {
|
||||
case R.id.action_delete_playlist:
|
||||
DeletePlaylistDialog.create(selection).show(activity.getSupportFragmentManager(), "DELETE_PLAYLIST");
|
||||
DeletePlaylistDialog.create(selection).show(activity.getSupportFragmentManager(), DeletePlaylistDialog.TAG);
|
||||
break;
|
||||
default:
|
||||
SongsMenuHelper.handleMenuClick(activity, getSongList(selection), menuItem.getItemId());
|
||||
|
|
|
|||
|
|
@ -34,16 +34,15 @@ public class HorizontalAlbumAdapter extends AlbumAdapter {
|
|||
|
||||
@Override
|
||||
protected void setColors(int color, ViewHolder holder) {
|
||||
if (holder.itemView != null) {
|
||||
CardView card = (CardView) holder.itemView;
|
||||
card.setCardBackgroundColor(color);
|
||||
if (holder.title != null) {
|
||||
holder.title.setTextColor(MaterialValueHelper.getPrimaryTextColor(activity, ColorUtil.isColorLight(color)));
|
||||
}
|
||||
CardView card = (CardView) holder.itemView;
|
||||
card.setCardBackgroundColor(color);
|
||||
|
||||
if (holder.text != null) {
|
||||
holder.text.setTextColor(MaterialValueHelper.getSecondaryTextColor(activity, ColorUtil.isColorLight(color)));
|
||||
}
|
||||
if (holder.title != null) {
|
||||
holder.title.setTextColor(MaterialValueHelper.getPrimaryTextColor(activity, ColorUtil.isColorLight(color)));
|
||||
}
|
||||
|
||||
if (holder.text != null) {
|
||||
holder.text.setTextColor(MaterialValueHelper.getSecondaryTextColor(activity, ColorUtil.isColorLight(color)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue