diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-11-10 22:03:11 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-11-10 22:03:11 -0800 |
commit | c7767207dc85058e41fbaf3e91bce1d1f94b6f9f (patch) | |
tree | 437d2bcc1fcf86fd0e38aad32cb822e31a48c9cf /src | |
parent | f9a1c9a8e207e773cf5373344efab2751e1931d4 (diff) | |
download | dsub-c7767207dc85058e41fbaf3e91bce1d1f94b6f9f.tar.gz dsub-c7767207dc85058e41fbaf3e91bce1d1f94b6f9f.tar.bz2 dsub-c7767207dc85058e41fbaf3e91bce1d1f94b6f9f.zip |
Updated some more icons
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/view/SongView.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/github/daneren2005/dsub/view/SongView.java b/src/github/daneren2005/dsub/view/SongView.java index c619834e..c256495b 100644 --- a/src/github/daneren2005/dsub/view/SongView.java +++ b/src/github/daneren2005/dsub/view/SongView.java @@ -51,13 +51,14 @@ public class SongView extends UpdateView implements Checkable { private TextView artistTextView; private TextView durationTextView; private TextView statusTextView; + private ImageView statusImageView; private DownloadService downloadService; private long revision = -1; private DownloadFile downloadFile; private boolean playing = false; - private int rightImage = 0; + private boolean rightImage = false; private int moreImage = 0; private boolean isWorkDone = false; private boolean isSaved = false; @@ -74,6 +75,7 @@ public class SongView extends UpdateView implements Checkable { artistTextView = (TextView) findViewById(R.id.song_artist); durationTextView = (TextView) findViewById(R.id.song_duration); statusTextView = (TextView) findViewById(R.id.song_status); + statusImageView = (ImageView) findViewById(R.id.song_status_icon); starButton = (ImageButton) findViewById(R.id.song_star); starButton.setFocusable(false); moreButton = (ImageView) findViewById(R.id.artist_more); @@ -194,7 +196,6 @@ public class SongView extends UpdateView implements Checkable { } } - int rightImage = 0; if (isWorkDone) { int moreImage = isSaved ? R.drawable.download_pinned : R.drawable.download_cached; if(moreImage != this.moreImage) { @@ -211,14 +212,15 @@ public class SongView extends UpdateView implements Checkable { if (downloadFile.isDownloading() && !downloadFile.isDownloadCancelled() && partialFileExists) { statusTextView.setText(Util.formatLocalizedBytes(partialFile.length(), getContext())); - rightImage = R.drawable.downloading; - } else if(this.rightImage != 0) { + if(!rightImage) { + statusImageView.setVisibility(View.VISIBLE); + rightImage = true; + } + } else if(rightImage) { statusTextView.setText(null); + statusImageView.setVisibility(View.GONE); + rightImage = false; } - if(this.rightImage != rightImage) { - statusTextView.setCompoundDrawablesWithIntrinsicBounds(0, 0, rightImage, 0); - this.rightImage = rightImage; - } boolean playing = downloadService.getCurrentPlaying() == downloadFile; if (playing) { |