aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2016-02-04 17:13:23 -0800
committerScott Jackson <daneren2005@gmail.com>2016-02-04 17:13:23 -0800
commitd5fb794717317a641321641b9b63705e7eea3eb6 (patch)
tree5757e9b3599dc62693205d1842654735b4991eec /app/src/main/java
parent2f7eaedf6a431d8e1677b7e0bfc129421cf90779 (diff)
downloaddsub-d5fb794717317a641321641b9b63705e7eea3eb6.tar.gz
dsub-d5fb794717317a641321641b9b63705e7eea3eb6.tar.bz2
dsub-d5fb794717317a641321641b9b63705e7eea3eb6.zip
Move Shared details dialog over to new format
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/SelectShareFragment.java33
1 files changed, 29 insertions, 4 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) {