diff options
author | Scott Jackson <daneren2005@users.noreply.github.com> | 2022-07-25 16:56:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 16:56:15 -0700 |
commit | 84a8603b0f556f0541429269d97bc3e99eaa67b0 (patch) | |
tree | c59cccade4d02565c22ffbf0734a21a9f2cfb92b | |
parent | d8d8b04d7d60717c16b778ebbb26ec63752ada25 (diff) | |
parent | 9acd92c0052a63b901b3bbe68733b96d8b791ee8 (diff) | |
download | dsub-84a8603b0f556f0541429269d97bc3e99eaa67b0.tar.gz dsub-84a8603b0f556f0541429269d97bc3e99eaa67b0.tar.bz2 dsub-84a8603b0f556f0541429269d97bc3e99eaa67b0.zip |
Merge pull request #1114 from raminou/edge
Add song suffix as details of list song item
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/view/SongView.java | 3 | ||||
-rw-r--r-- | app/src/main/res/layout/song_list_item.xml | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/view/SongView.java b/app/src/main/java/github/daneren2005/dsub/view/SongView.java index 320c5933..7a91ea6e 100644 --- a/app/src/main/java/github/daneren2005/dsub/view/SongView.java +++ b/app/src/main/java/github/daneren2005/dsub/view/SongView.java @@ -53,6 +53,7 @@ public class SongView extends UpdateView2<MusicDirectory.Entry, Boolean> { private ImageView bookmarkButton; private ImageView playedButton; private View bottomRowView; + private TextView suffixTextView; private DownloadService downloadService; private long revision = -1; @@ -92,6 +93,7 @@ public class SongView extends UpdateView2<MusicDirectory.Entry, Boolean> { playedButton = (ImageButton) findViewById(R.id.song_played); moreButton = (ImageView) findViewById(R.id.item_more); bottomRowView = findViewById(R.id.song_bottom); + suffixTextView = (TextView) findViewById(R.id.song_suffix); } public void setObjectImpl(MusicDirectory.Entry song, Boolean checkable) { @@ -175,6 +177,7 @@ public class SongView extends UpdateView2<MusicDirectory.Entry, Boolean> { titleTextView.setText(title); artistTextView.setText(artist); + suffixTextView.setText(song.getSuffix()); this.setBackgroundColor(0x00000000); ratingBar.setVisibility(View.GONE); diff --git a/app/src/main/res/layout/song_list_item.xml b/app/src/main/res/layout/song_list_item.xml index d7c8d312..678f9d82 100644 --- a/app/src/main/res/layout/song_list_item.xml +++ b/app/src/main/res/layout/song_list_item.xml @@ -87,6 +87,17 @@ android:layout_gravity="top" android:src="?attr/downloading" android:visibility="gone"/> + + <TextView + android:id="@+id/song_suffix" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="right|center_vertical" + android:textAppearance="?android:attr/textAppearanceSmall" + android:singleLine="true" + android:paddingLeft="3dip" + android:paddingRight="4dip" + android:textColor="?android:textColorSecondary"/> </LinearLayout> <LinearLayout |