diff options
author | Scott Jackson <daneren2005@gmail.com> | 2016-02-04 17:13:23 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2016-02-04 17:13:23 -0800 |
commit | d5fb794717317a641321641b9b63705e7eea3eb6 (patch) | |
tree | 5757e9b3599dc62693205d1842654735b4991eec | |
parent | 2f7eaedf6a431d8e1677b7e0bfc129421cf90779 (diff) | |
download | dsub-d5fb794717317a641321641b9b63705e7eea3eb6.tar.gz dsub-d5fb794717317a641321641b9b63705e7eea3eb6.tar.bz2 dsub-d5fb794717317a641321641b9b63705e7eea3eb6.zip |
Move Shared details dialog over to new format
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/SelectShareFragment.java | 33 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 9 |
2 files changed, 34 insertions, 8 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectShareFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectShareFragment.java index cb0e48b9..f231fa33 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectShareFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectShareFragment.java @@ -27,6 +27,7 @@ import android.widget.CompoundButton; import android.widget.DatePicker; import android.widget.EditText; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -104,10 +105,34 @@ public class SelectShareFragment extends SelectRecyclerFragment<Share> { } private void displayShareInfo(final Share share) { - String message = context.getResources().getString(R.string.share_info, - share.getUsername(), (share.getDescription() != null) ? share.getDescription() : "", share.getUrl(), - Util.formatDate(share.getCreated()), Util.formatDate(share.getLastVisited()), Util.formatDate(share.getExpires()), share.getVisitCount()); - Util.info(context, share.getName(), message); + List<Integer> headers = new ArrayList<>(); + List<String> details = new ArrayList<>(); + + headers.add(R.string.details_title); + details.add(share.getName()); + + headers.add(R.string.details_owner); + details.add(share.getUsername()); + + headers.add(R.string.details_description); + details.add(share.getDescription()); + + headers.add(R.string.details_url); + details.add(share.getUrl()); + + headers.add(R.string.details_created); + details.add(Util.formatDate(share.getCreated())); + + headers.add(R.string.details_last_played); + details.add(Util.formatDate(share.getLastVisited())); + + headers.add(R.string.details_expiration); + details.add(Util.formatDate(share.getExpires(), false)); + + headers.add(R.string.details_played_count); + details.add(Long.toString(share.getVisitCount())); + + Util.showDetailsDialog(context, R.string.details_title_playlist, headers, details); } private void updateShareInfo(final Share share) { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b7efff1a..174e6588 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -488,10 +488,9 @@ <string name="shuffle.genre">Genre:</string> <string name="shuffle.pick_genre">Pick a genre</string> - <string name="share.info">Owner: %1$s - \nDescription: %2$s - \nURL: %3$s - \nCreation: %4$s + <string name="share.info"> + + \nLast Visited: %5$s \nExpiration: %6$s \nVisit Count: %7$s @@ -651,6 +650,8 @@ <string name="details.updated">Updated</string> <string name="details.starred">Starred</string> <string name="details.last_played">Last Played</string> + <string name="details.expiration">Expiration</string> + <string name="details.played_count">Played Count</string> <plurals name="select_album_n_songs"> <item quantity="zero">No songs</item> |