Add icon to playlist length
This commit is contained in:
parent
07e7c6565a
commit
c21180fb2d
2 changed files with 18 additions and 1 deletions
|
|
@ -37,9 +37,10 @@ public class PlaylistSongAdapter extends AbsOffsetSongAdapter {
|
|||
@Override
|
||||
public void onBindViewHolder(@NonNull final SongAdapter.ViewHolder holder, int position) {
|
||||
if (holder.getItemViewType() == OFFSET_ITEM) {
|
||||
int textColor = ThemeStore.textColorSecondary(activity);
|
||||
if (holder.title != null) {
|
||||
holder.title.setText(MusicUtil.getPlaylistInfoString(activity, dataSet));
|
||||
holder.title.setTextColor(ThemeStore.textColorSecondary(activity));
|
||||
holder.title.setTextColor(textColor);
|
||||
}
|
||||
if (holder.text != null) {
|
||||
holder.text.setVisibility(View.GONE);
|
||||
|
|
@ -47,6 +48,12 @@ public class PlaylistSongAdapter extends AbsOffsetSongAdapter {
|
|||
if (holder.menu != null) {
|
||||
holder.menu.setVisibility(View.GONE);
|
||||
}
|
||||
if (holder.image != null) {
|
||||
final int padding = activity.getResources().getDimensionPixelSize(R.dimen.default_item_margin) / 2;
|
||||
holder.image.setPadding(padding, padding, padding, padding);
|
||||
holder.image.setColorFilter(textColor);
|
||||
holder.image.setImageResource(R.drawable.ic_timer_white_24dp);
|
||||
}
|
||||
if (holder.dragView != null) {
|
||||
holder.dragView.setVisibility(View.GONE);
|
||||
}
|
||||
|
|
|
|||
10
app/src/main/res/drawable/ic_timer_white_24dp.xml
Normal file
10
app/src/main/res/drawable/ic_timer_white_24dp.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0"
|
||||
android:width="24dp">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M15,1L9,1v2h6L15,1zM11,14h2L13,8h-2v6zM19.03,7.39l1.42,-1.42c-0.43,-0.51 -0.9,-0.99 -1.41,-1.41l-1.42,1.42C16.07,4.74 14.12,4 12,4c-4.97,0 -9,4.03 -9,9s4.02,9 9,9 9,-4.03 9,-9c0,-2.12 -0.74,-4.07 -1.97,-5.61zM12,20c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z" />
|
||||
</vector>
|
||||
Loading…
Add table
Add a link
Reference in a new issue