From d1f51a6b805590081990ab54089ae1a116c166b2 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Thu, 30 Jul 2015 19:02:27 -0700 Subject: Missed in last commit --- .../dsub/fragments/SelectBookmarkFragment.java | 37 +++++++++++++++++----- 1 file changed, 29 insertions(+), 8 deletions(-) (limited to 'app') 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 headers = new ArrayList<>(); + List 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); } } -- cgit v1.2.3