aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/drawable-hdpi/action_toggle_list.pngbin552 -> 0 bytes
-rw-r--r--res/drawable-hdpi/action_toggle_list_dark.pngbin0 -> 290 bytes
-rw-r--r--res/drawable-hdpi/action_toggle_list_light.pngbin0 -> 309 bytes
-rw-r--r--res/drawable-hdpi/actionbar_background.9.pngbin234 -> 0 bytes
-rw-r--r--res/drawable-hdpi/album_art_background.pngbin9287 -> 0 bytes
-rw-r--r--res/drawable-hdpi/downloading.pngbin457 -> 0 bytes
-rw-r--r--res/drawable-hdpi/downloading_dark.pngbin0 -> 618 bytes
-rw-r--r--res/drawable-hdpi/downloading_light.pngbin0 -> 743 bytes
-rw-r--r--res/drawable-hdpi/main_select_server.pngbin1920 -> 0 bytes
-rw-r--r--res/drawable-hdpi/main_select_server_dark.pngbin0 -> 720 bytes
-rw-r--r--res/drawable-hdpi/main_select_server_light.pngbin0 -> 799 bytes
-rw-r--r--res/drawable-mdpi/action_toggle_list_dark.pngbin0 -> 204 bytes
-rw-r--r--res/drawable-mdpi/action_toggle_list_light.pngbin0 -> 225 bytes
-rw-r--r--res/drawable-mdpi/downloading_dark.pngbin0 -> 447 bytes
-rw-r--r--res/drawable-mdpi/downloading_light.pngbin0 -> 527 bytes
-rw-r--r--res/drawable-mdpi/main_select_server_dark.pngbin0 -> 434 bytes
-rw-r--r--res/drawable-mdpi/main_select_server_light.pngbin0 -> 502 bytes
-rw-r--r--res/drawable-xhdpi/action_toggle_list_dark.pngbin0 -> 312 bytes
-rw-r--r--res/drawable-xhdpi/action_toggle_list_light.pngbin0 -> 320 bytes
-rw-r--r--res/drawable-xhdpi/downloading_dark.pngbin0 -> 869 bytes
-rw-r--r--res/drawable-xhdpi/downloading_light.pngbin0 -> 1017 bytes
-rw-r--r--res/drawable-xhdpi/main_select_server_dark.pngbin0 -> 939 bytes
-rw-r--r--res/drawable-xhdpi/main_select_server_light.pngbin0 -> 1079 bytes
-rw-r--r--res/drawable-xxhdpi/action_toggle_list_dark.pngbin0 -> 608 bytes
-rw-r--r--res/drawable-xxhdpi/action_toggle_list_light.pngbin0 -> 630 bytes
-rw-r--r--res/drawable-xxhdpi/downloading_dark.pngbin0 -> 1353 bytes
-rw-r--r--res/drawable-xxhdpi/downloading_light.pngbin0 -> 1542 bytes
-rw-r--r--res/drawable-xxhdpi/main_select_server_dark.pngbin0 -> 1396 bytes
-rw-r--r--res/drawable-xxhdpi/main_select_server_light.pngbin0 -> 1622 bytes
-rw-r--r--res/layout/download_media_buttons.xml2
-rw-r--r--res/layout/main_buttons.xml2
-rw-r--r--res/layout/select_artist_header.xml2
-rw-r--r--res/layout/song_list_item.xml20
-rw-r--r--res/values/attrs.xml3
-rw-r--r--res/values/themes.xml9
-rw-r--r--src/github/daneren2005/dsub/view/SongView.java18
36 files changed, 39 insertions, 17 deletions
diff --git a/res/drawable-hdpi/action_toggle_list.png b/res/drawable-hdpi/action_toggle_list.png
deleted file mode 100644
index 87f9280f..00000000
--- a/res/drawable-hdpi/action_toggle_list.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/action_toggle_list_dark.png b/res/drawable-hdpi/action_toggle_list_dark.png
new file mode 100644
index 00000000..d0ec1a5d
--- /dev/null
+++ b/res/drawable-hdpi/action_toggle_list_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/action_toggle_list_light.png b/res/drawable-hdpi/action_toggle_list_light.png
new file mode 100644
index 00000000..60ec88be
--- /dev/null
+++ b/res/drawable-hdpi/action_toggle_list_light.png
Binary files differ
diff --git a/res/drawable-hdpi/actionbar_background.9.png b/res/drawable-hdpi/actionbar_background.9.png
deleted file mode 100644
index 9ce38a61..00000000
--- a/res/drawable-hdpi/actionbar_background.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/album_art_background.png b/res/drawable-hdpi/album_art_background.png
deleted file mode 100644
index f0757695..00000000
--- a/res/drawable-hdpi/album_art_background.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/downloading.png b/res/drawable-hdpi/downloading.png
deleted file mode 100644
index afff39a9..00000000
--- a/res/drawable-hdpi/downloading.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/downloading_dark.png b/res/drawable-hdpi/downloading_dark.png
new file mode 100644
index 00000000..3ccb1837
--- /dev/null
+++ b/res/drawable-hdpi/downloading_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/downloading_light.png b/res/drawable-hdpi/downloading_light.png
new file mode 100644
index 00000000..07be3016
--- /dev/null
+++ b/res/drawable-hdpi/downloading_light.png
Binary files differ
diff --git a/res/drawable-hdpi/main_select_server.png b/res/drawable-hdpi/main_select_server.png
deleted file mode 100644
index c2cefead..00000000
--- a/res/drawable-hdpi/main_select_server.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/main_select_server_dark.png b/res/drawable-hdpi/main_select_server_dark.png
new file mode 100644
index 00000000..e3a9dd5d
--- /dev/null
+++ b/res/drawable-hdpi/main_select_server_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/main_select_server_light.png b/res/drawable-hdpi/main_select_server_light.png
new file mode 100644
index 00000000..4606410d
--- /dev/null
+++ b/res/drawable-hdpi/main_select_server_light.png
Binary files differ
diff --git a/res/drawable-mdpi/action_toggle_list_dark.png b/res/drawable-mdpi/action_toggle_list_dark.png
new file mode 100644
index 00000000..ace7fcee
--- /dev/null
+++ b/res/drawable-mdpi/action_toggle_list_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/action_toggle_list_light.png b/res/drawable-mdpi/action_toggle_list_light.png
new file mode 100644
index 00000000..fa6432da
--- /dev/null
+++ b/res/drawable-mdpi/action_toggle_list_light.png
Binary files differ
diff --git a/res/drawable-mdpi/downloading_dark.png b/res/drawable-mdpi/downloading_dark.png
new file mode 100644
index 00000000..ae6c5c9c
--- /dev/null
+++ b/res/drawable-mdpi/downloading_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/downloading_light.png b/res/drawable-mdpi/downloading_light.png
new file mode 100644
index 00000000..abd5b748
--- /dev/null
+++ b/res/drawable-mdpi/downloading_light.png
Binary files differ
diff --git a/res/drawable-mdpi/main_select_server_dark.png b/res/drawable-mdpi/main_select_server_dark.png
new file mode 100644
index 00000000..119b1573
--- /dev/null
+++ b/res/drawable-mdpi/main_select_server_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/main_select_server_light.png b/res/drawable-mdpi/main_select_server_light.png
new file mode 100644
index 00000000..7d8dad34
--- /dev/null
+++ b/res/drawable-mdpi/main_select_server_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/action_toggle_list_dark.png b/res/drawable-xhdpi/action_toggle_list_dark.png
new file mode 100644
index 00000000..92003c6b
--- /dev/null
+++ b/res/drawable-xhdpi/action_toggle_list_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/action_toggle_list_light.png b/res/drawable-xhdpi/action_toggle_list_light.png
new file mode 100644
index 00000000..a4007ea5
--- /dev/null
+++ b/res/drawable-xhdpi/action_toggle_list_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/downloading_dark.png b/res/drawable-xhdpi/downloading_dark.png
new file mode 100644
index 00000000..3f14bdf4
--- /dev/null
+++ b/res/drawable-xhdpi/downloading_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/downloading_light.png b/res/drawable-xhdpi/downloading_light.png
new file mode 100644
index 00000000..643c15d0
--- /dev/null
+++ b/res/drawable-xhdpi/downloading_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/main_select_server_dark.png b/res/drawable-xhdpi/main_select_server_dark.png
new file mode 100644
index 00000000..b84f1851
--- /dev/null
+++ b/res/drawable-xhdpi/main_select_server_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/main_select_server_light.png b/res/drawable-xhdpi/main_select_server_light.png
new file mode 100644
index 00000000..ee154cc7
--- /dev/null
+++ b/res/drawable-xhdpi/main_select_server_light.png
Binary files differ
diff --git a/res/drawable-xxhdpi/action_toggle_list_dark.png b/res/drawable-xxhdpi/action_toggle_list_dark.png
new file mode 100644
index 00000000..598fc312
--- /dev/null
+++ b/res/drawable-xxhdpi/action_toggle_list_dark.png
Binary files differ
diff --git a/res/drawable-xxhdpi/action_toggle_list_light.png b/res/drawable-xxhdpi/action_toggle_list_light.png
new file mode 100644
index 00000000..ceb3fade
--- /dev/null
+++ b/res/drawable-xxhdpi/action_toggle_list_light.png
Binary files differ
diff --git a/res/drawable-xxhdpi/downloading_dark.png b/res/drawable-xxhdpi/downloading_dark.png
new file mode 100644
index 00000000..afc4bf84
--- /dev/null
+++ b/res/drawable-xxhdpi/downloading_dark.png
Binary files differ
diff --git a/res/drawable-xxhdpi/downloading_light.png b/res/drawable-xxhdpi/downloading_light.png
new file mode 100644
index 00000000..ba31a979
--- /dev/null
+++ b/res/drawable-xxhdpi/downloading_light.png
Binary files differ
diff --git a/res/drawable-xxhdpi/main_select_server_dark.png b/res/drawable-xxhdpi/main_select_server_dark.png
new file mode 100644
index 00000000..b85e3a1e
--- /dev/null
+++ b/res/drawable-xxhdpi/main_select_server_dark.png
Binary files differ
diff --git a/res/drawable-xxhdpi/main_select_server_light.png b/res/drawable-xxhdpi/main_select_server_light.png
new file mode 100644
index 00000000..8fc39eff
--- /dev/null
+++ b/res/drawable-xxhdpi/main_select_server_light.png
Binary files differ
diff --git a/res/layout/download_media_buttons.xml b/res/layout/download_media_buttons.xml
index 1835a373..1ccf6c68 100644
--- a/res/layout/download_media_buttons.xml
+++ b/res/layout/download_media_buttons.xml
@@ -54,7 +54,7 @@
<ImageButton
style="@style/PlaybackControl.Small"
android:id="@+id/download_toggle_list"
- android:src="@drawable/action_toggle_list"
+ android:src="?attr/toggle_list"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
/>
diff --git a/res/layout/main_buttons.xml b/res/layout/main_buttons.xml
index c087bc2d..7729315c 100644
--- a/res/layout/main_buttons.xml
+++ b/res/layout/main_buttons.xml
@@ -15,7 +15,7 @@
android:minHeight="?android:attr/listPreferredItemHeight">
<ImageView
- android:src="@drawable/main_select_server"
+ android:src="?attr/select_server"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
diff --git a/res/layout/select_artist_header.xml b/res/layout/select_artist_header.xml
index 0b3d151b..ba1b3d47 100644
--- a/res/layout/select_artist_header.xml
+++ b/res/layout/select_artist_header.xml
@@ -14,7 +14,7 @@
android:minHeight="?android:attr/listPreferredItemHeight">
<ImageView
- android:src="@drawable/main_select_server"
+ android:src="?attr/select_server"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
diff --git a/res/layout/song_list_item.xml b/res/layout/song_list_item.xml
index e6bef279..3bf7ab44 100644
--- a/res/layout/song_list_item.xml
+++ b/res/layout/song_list_item.xml
@@ -48,12 +48,20 @@
android:visibility="gone"/>
<TextView
- android:id="@+id/song_status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right|center_vertical"
- android:drawablePadding="1dip"
- android:paddingRight="6dip"/>
+ android:id="@+id/song_status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right|center_vertical"
+ android:drawablePadding="1dip"
+ android:paddingRight="2dip"/>
+
+ <ImageView
+ android:id="@+id/song_status_icon"
+ android:layout_width="24dip"
+ android:layout_height="24dip"
+ android:layout_gravity="center_vertical"
+ android:src="?attr/downloading"
+ android:visibility="gone"/>
</LinearLayout>
<LinearLayout android:orientation="horizontal"
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index f38f749a..78009e60 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -15,5 +15,8 @@
<attr name="remove" format="reference"/>
<attr name="save" format="reference"/>
<attr name="volume" format="reference"/>
+ <attr name="toggle_list" format="reference"/>
+ <attr name="select_server" format="reference"/>
+ <attr name="downloading" format="reference"/>
<attr name="drawerItemsIcons" format="reference"/>
</resources>
diff --git a/res/values/themes.xml b/res/values/themes.xml
index 7e48cfb9..06cbab6e 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -18,6 +18,9 @@
<item name="remove">@drawable/ic_menu_remove_light</item>
<item name="save">@drawable/ic_menu_save_light</item>
<item name="volume">@drawable/ic_action_volume_light</item>
+ <item name="toggle_list">@drawable/action_toggle_list_light</item>
+ <item name="select_server">@drawable/main_select_server_light</item>
+ <item name="downloading">@drawable/downloading_light</item>
<item name="drawerItemsIcons">@array/drawerItemIconsLight</item>
<item name="android:textViewStyle">@style/DSub.TextViewStyle</item>
<item name="android:buttonStyle">@style/DSub.ButtonStyle</item>
@@ -41,6 +44,9 @@
<item name="remove">@drawable/ic_menu_remove_dark</item>
<item name="save">@drawable/ic_menu_save_dark</item>
<item name="volume">@drawable/ic_action_volume_dark</item>
+ <item name="toggle_list">@drawable/action_toggle_list_dark</item>
+ <item name="select_server">@drawable/main_select_server_dark</item>
+ <item name="downloading">@drawable/downloading_dark</item>
<item name="drawerItemsIcons">@array/drawerItemIconsDark</item>
<item name="android:textViewStyle">@style/DSub.TextViewStyle</item>
<item name="android:buttonStyle">@style/DSub.ButtonStyle</item>
@@ -67,6 +73,9 @@
<item name="remove">@drawable/ic_menu_remove_dark</item>
<item name="save">@drawable/ic_menu_save_dark</item>
<item name="volume">@drawable/ic_action_volume_dark</item>
+ <item name="toggle_list">@drawable/action_toggle_list_dark</item>
+ <item name="select_server">@drawable/main_select_server_dark</item>
+ <item name="downloading">@drawable/downloading_dark</item>
<item name="drawerItemsIcons">@array/drawerItemIconsDark</item>
<item name="android:textViewStyle">@style/DSub.TextViewStyle</item>
<item name="android:buttonStyle">@style/DSub.ButtonStyle</item>
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) {