aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-07-30 19:02:27 -0700
committerScott Jackson <daneren2005@gmail.com>2015-07-30 19:02:27 -0700
commitd1f51a6b805590081990ab54089ae1a116c166b2 (patch)
tree506f7cc30d456cbbb244946687f2ddffc1265b02 /app
parenta85002d1ad0d8405d3b8cbe499d80a78c8fb5b45 (diff)
downloaddsub-d1f51a6b805590081990ab54089ae1a116c166b2.tar.gz
dsub-d1f51a6b805590081990ab54089ae1a116c166b2.tar.bz2
dsub-d1f51a6b805590081990ab54089ae1a116c166b2.zip
Missed in last commit
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java37
1 files changed, 29 insertions, 8 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java
index f45c1af9..d992319b 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java
@@ -38,6 +38,7 @@ import github.daneren2005.dsub.util.Util;
import github.daneren2005.dsub.adapter.BookmarkAdapter;
import github.daneren2005.dsub.view.UpdateView;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -108,15 +109,35 @@ public class SelectBookmarkFragment extends SelectRecyclerFragment<MusicDirector
private void displayBookmarkInfo(final MusicDirectory.Entry entry) {
Bookmark bookmark = entry.getBookmark();
- String comment = bookmark.getComment();
- if(comment == null) {
- comment = "";
+ List<Integer> headers = new ArrayList<>();
+ List<String> details = new ArrayList<>();
+
+ headers.add(R.string.details_song);
+ details.add(entry.getTitle());
+
+ if(entry.getArtist() != null) {
+ headers.add(R.string.details_artist);
+ details.add(entry.getArtist());
+ }
+ if(entry.getAlbum() != null) {
+ headers.add(R.string.details_album);
+ details.add(entry.getAlbum());
+ }
+
+ headers.add(R.string.details_position);
+ details.add(Util.formatDuration(bookmark.getPosition() / 1000));
+
+ headers.add(R.string.details_created);
+ details.add(Util.formatDate(bookmark.getCreated()));
+
+ headers.add(R.string.details_updated);
+ details.add(Util.formatDate(bookmark.getChanged()));
+
+ if(bookmark.getComment() != null) {
+ headers.add(R.string.details_comments);
+ details.add(bookmark.getComment());
}
- String msg = context.getResources().getString(R.string.bookmark_details,
- entry.getTitle(), Util.formatDuration(bookmark.getPosition() / 1000),
- Util.formatDate(bookmark.getCreated()), Util.formatDate(bookmark.getChanged()), comment);
-
- Util.info(context, R.string.bookmark_details_title, msg, false);
+ Util.showDetailsDialog(context, R.string.bookmark_details_title, headers, details);
}
}