aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-12-04 21:35:48 -0800
committerScott Jackson <daneren2005@gmail.com>2013-12-04 21:35:48 -0800
commit75a7c008a11d367882e004e472cd98eb19af32af (patch)
tree8d9fff2cceea5e12c14f9042c2b452e046f6fd24
parent61d534dc5fe78d36458022aad9ec0feffa2ebf39 (diff)
downloaddsub-75a7c008a11d367882e004e472cd98eb19af32af.tar.gz
dsub-75a7c008a11d367882e004e472cd98eb19af32af.tar.bz2
dsub-75a7c008a11d367882e004e472cd98eb19af32af.zip
#206 Add popup album art
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
index b5a7d9ad..9e674466 100644
--- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
@@ -14,10 +14,13 @@ import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import github.daneren2005.dsub.R;
import github.daneren2005.dsub.domain.MusicDirectory;
+import github.daneren2005.dsub.util.ImageLoader;
import github.daneren2005.dsub.util.SilentBackgroundTask;
import github.daneren2005.dsub.view.EntryAdapter;
@@ -879,9 +882,23 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
header = LayoutInflater.from(context).inflate(R.layout.select_album_header, entryList, false);
add = true;
}
-
+
+ final ImageLoader imageLoader = getImageLoader();
+ final MusicDirectory.Entry albumRep = entries.get(random.nextInt(entries.size()));
View coverArtView = header.findViewById(R.id.select_album_art);
- getImageLoader().loadImage(coverArtView, entries.get(random.nextInt(entries.size())), false, true);
+ coverArtView.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ AlertDialog.Builder imageDialog = new AlertDialog.Builder(context);
+ ImageView fullScreenView = new ImageView(context);
+ imageLoader.loadImage(fullScreenView, albumRep, true, true);
+ imageDialog.setView(fullScreenView);
+ imageDialog.setCancelable(true);
+ imageDialog.create();
+ imageDialog.show();
+ }
+ });
+ imageLoader.loadImage(coverArtView, albumRep, false, true);
TextView titleView = (TextView) header.findViewById(R.id.select_album_title);
if(playlistName != null) {