Replaced images with text in the playing queue
This commit is contained in:
parent
a5c6ff1d1d
commit
a2b70ced16
1 changed files with 15 additions and 1 deletions
|
|
@ -42,6 +42,9 @@ public class PlayingQueueAdapter extends SongAdapter implements DraggableItemAda
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull SongAdapter.ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull SongAdapter.ViewHolder holder, int position) {
|
||||||
super.onBindViewHolder(holder, position);
|
super.onBindViewHolder(holder, position);
|
||||||
|
if (holder.imageText != null) {
|
||||||
|
holder.imageText.setText(String.valueOf(position - current));
|
||||||
|
}
|
||||||
if (holder.getItemViewType() == HISTORY) {
|
if (holder.getItemViewType() == HISTORY) {
|
||||||
setAlpha(holder, 0.5f);
|
setAlpha(holder, 0.5f);
|
||||||
} else if (holder.getItemViewType() == CURRENT) {
|
} else if (holder.getItemViewType() == CURRENT) {
|
||||||
|
|
@ -59,6 +62,11 @@ public class PlayingQueueAdapter extends SongAdapter implements DraggableItemAda
|
||||||
return CURRENT;
|
return CURRENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void loadAlbumCover(Song song, SongAdapter.ViewHolder holder) {
|
||||||
|
// We don't need to load it in this adapter
|
||||||
|
}
|
||||||
|
|
||||||
public void swapDataSet(ArrayList<Song> dataSet, int position) {
|
public void swapDataSet(ArrayList<Song> dataSet, int position) {
|
||||||
this.dataSet = dataSet;
|
this.dataSet = dataSet;
|
||||||
current = position;
|
current = position;
|
||||||
|
|
@ -90,7 +98,7 @@ public class PlayingQueueAdapter extends SongAdapter implements DraggableItemAda
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCheckCanStartDrag(ViewHolder holder, int position, int x, int y) {
|
public boolean onCheckCanStartDrag(ViewHolder holder, int position, int x, int y) {
|
||||||
return ViewUtil.hitTest(holder.image, x, y);
|
return ViewUtil.hitTest(holder.imageText, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -109,6 +117,12 @@ public class PlayingQueueAdapter extends SongAdapter implements DraggableItemAda
|
||||||
|
|
||||||
public ViewHolder(@NonNull View itemView) {
|
public ViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
if (imageText != null) {
|
||||||
|
imageText.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
if (image != null) {
|
||||||
|
image.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue