aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/drawable-hdpi/download_cached.pngbin0 -> 1172 bytes
-rw-r--r--res/drawable-hdpi/download_none_dark.pngbin0 -> 342 bytes
-rw-r--r--res/drawable-hdpi/download_none_light.pngbin0 -> 374 bytes
-rw-r--r--res/drawable-hdpi/download_pinned.pngbin0 -> 1112 bytes
-rw-r--r--res/drawable-hdpi/list_item_more.9.pngbin5838 -> 0 bytes
-rw-r--r--res/drawable-hdpi/list_item_more_saved.9.pngbin5919 -> 0 bytes
-rw-r--r--res/drawable-hdpi/list_item_more_shaded.9.pngbin5994 -> 0 bytes
-rw-r--r--res/drawable-mdpi/download_cached.pngbin0 -> 824 bytes
-rw-r--r--res/drawable-mdpi/download_none_dark.pngbin0 -> 216 bytes
-rw-r--r--res/drawable-mdpi/download_none_light.pngbin0 -> 239 bytes
-rw-r--r--res/drawable-mdpi/download_pinned.pngbin0 -> 841 bytes
-rw-r--r--res/drawable-xhdpi/download_cached.pngbin0 -> 1721 bytes
-rw-r--r--res/drawable-xhdpi/download_none_dark.pngbin0 -> 355 bytes
-rw-r--r--res/drawable-xhdpi/download_none_light.pngbin0 -> 375 bytes
-rw-r--r--res/drawable-xhdpi/download_pinned.pngbin0 -> 1750 bytes
-rw-r--r--res/drawable-xxhdpi/download_none_dark.pngbin0 -> 617 bytes
-rw-r--r--res/drawable-xxhdpi/download_none_light.pngbin0 -> 639 bytes
-rw-r--r--res/layout/album_list_item.xml2
-rw-r--r--res/layout/artist_list_item.xml2
-rw-r--r--res/layout/main_buttons.xml7
-rw-r--r--res/layout/playlist_list_item.xml2
-rw-r--r--res/layout/song_list_item.xml2
-rw-r--r--res/values/attrs.xml3
-rw-r--r--res/values/themes.xml3
-rw-r--r--src/github/daneren2005/dsub/view/SongView.java15
-rw-r--r--src/github/daneren2005/dsub/view/UpdateView.java11
26 files changed, 25 insertions, 22 deletions
diff --git a/res/drawable-hdpi/download_cached.png b/res/drawable-hdpi/download_cached.png
new file mode 100644
index 00000000..d935cb2c
--- /dev/null
+++ b/res/drawable-hdpi/download_cached.png
Binary files differ
diff --git a/res/drawable-hdpi/download_none_dark.png b/res/drawable-hdpi/download_none_dark.png
new file mode 100644
index 00000000..a074c10d
--- /dev/null
+++ b/res/drawable-hdpi/download_none_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/download_none_light.png b/res/drawable-hdpi/download_none_light.png
new file mode 100644
index 00000000..21544e5f
--- /dev/null
+++ b/res/drawable-hdpi/download_none_light.png
Binary files differ
diff --git a/res/drawable-hdpi/download_pinned.png b/res/drawable-hdpi/download_pinned.png
new file mode 100644
index 00000000..b5b6dfb1
--- /dev/null
+++ b/res/drawable-hdpi/download_pinned.png
Binary files differ
diff --git a/res/drawable-hdpi/list_item_more.9.png b/res/drawable-hdpi/list_item_more.9.png
deleted file mode 100644
index 79ca860d..00000000
--- a/res/drawable-hdpi/list_item_more.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/list_item_more_saved.9.png b/res/drawable-hdpi/list_item_more_saved.9.png
deleted file mode 100644
index f3805bfb..00000000
--- a/res/drawable-hdpi/list_item_more_saved.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/list_item_more_shaded.9.png b/res/drawable-hdpi/list_item_more_shaded.9.png
deleted file mode 100644
index 99c2f5b8..00000000
--- a/res/drawable-hdpi/list_item_more_shaded.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/download_cached.png b/res/drawable-mdpi/download_cached.png
new file mode 100644
index 00000000..fa02cc7c
--- /dev/null
+++ b/res/drawable-mdpi/download_cached.png
Binary files differ
diff --git a/res/drawable-mdpi/download_none_dark.png b/res/drawable-mdpi/download_none_dark.png
new file mode 100644
index 00000000..b6d614fc
--- /dev/null
+++ b/res/drawable-mdpi/download_none_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/download_none_light.png b/res/drawable-mdpi/download_none_light.png
new file mode 100644
index 00000000..2485c570
--- /dev/null
+++ b/res/drawable-mdpi/download_none_light.png
Binary files differ
diff --git a/res/drawable-mdpi/download_pinned.png b/res/drawable-mdpi/download_pinned.png
new file mode 100644
index 00000000..8e6e8e7a
--- /dev/null
+++ b/res/drawable-mdpi/download_pinned.png
Binary files differ
diff --git a/res/drawable-xhdpi/download_cached.png b/res/drawable-xhdpi/download_cached.png
new file mode 100644
index 00000000..1ef7c805
--- /dev/null
+++ b/res/drawable-xhdpi/download_cached.png
Binary files differ
diff --git a/res/drawable-xhdpi/download_none_dark.png b/res/drawable-xhdpi/download_none_dark.png
new file mode 100644
index 00000000..7be3c2a4
--- /dev/null
+++ b/res/drawable-xhdpi/download_none_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/download_none_light.png b/res/drawable-xhdpi/download_none_light.png
new file mode 100644
index 00000000..817651d7
--- /dev/null
+++ b/res/drawable-xhdpi/download_none_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/download_pinned.png b/res/drawable-xhdpi/download_pinned.png
new file mode 100644
index 00000000..09eb6ffb
--- /dev/null
+++ b/res/drawable-xhdpi/download_pinned.png
Binary files differ
diff --git a/res/drawable-xxhdpi/download_none_dark.png b/res/drawable-xxhdpi/download_none_dark.png
new file mode 100644
index 00000000..a0cb8a41
--- /dev/null
+++ b/res/drawable-xxhdpi/download_none_dark.png
Binary files differ
diff --git a/res/drawable-xxhdpi/download_none_light.png b/res/drawable-xxhdpi/download_none_light.png
new file mode 100644
index 00000000..7a1639ef
--- /dev/null
+++ b/res/drawable-xxhdpi/download_none_light.png
Binary files differ
diff --git a/res/layout/album_list_item.xml b/res/layout/album_list_item.xml
index ee710539..51b45b5d 100644
--- a/res/layout/album_list_item.xml
+++ b/res/layout/album_list_item.xml
@@ -51,7 +51,7 @@
<ImageView
android:id="@+id/album_more"
- android:src="@drawable/list_item_more"
+ android:src="?attr/download_none"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="right|center_vertical"
diff --git a/res/layout/artist_list_item.xml b/res/layout/artist_list_item.xml
index edf1930e..64512e99 100644
--- a/res/layout/artist_list_item.xml
+++ b/res/layout/artist_list_item.xml
@@ -29,7 +29,7 @@
<ImageView
android:id="@+id/artist_more"
- android:src="@drawable/list_item_more"
+ android:src="?attr/download_none"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="right|center_vertical"
diff --git a/res/layout/main_buttons.xml b/res/layout/main_buttons.xml
index 1e60838d..c087bc2d 100644
--- a/res/layout/main_buttons.xml
+++ b/res/layout/main_buttons.xml
@@ -71,7 +71,6 @@
<TextView
android:id="@+id/main_albums_newest"
android:text="@string/main.albums_newest"
- android:drawableRight="@drawable/list_item_more"
android:drawablePadding="6dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -83,7 +82,6 @@
<TextView
android:id="@+id/main_albums_recent"
android:text="@string/main.albums_recent"
- android:drawableRight="@drawable/list_item_more"
android:drawablePadding="6dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -95,7 +93,6 @@
<TextView
android:id="@+id/main_albums_frequent"
android:text="@string/main.albums_frequent"
- android:drawableRight="@drawable/list_item_more"
android:drawablePadding="6dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -107,7 +104,6 @@
<TextView
android:id="@+id/main_albums_highest"
android:text="@string/main.albums_highest"
- android:drawableRight="@drawable/list_item_more"
android:drawablePadding="6dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -119,7 +115,6 @@
<TextView
android:id="@+id/main_albums_starred"
android:text="@string/main.albums_starred"
- android:drawableRight="@drawable/list_item_more"
android:drawablePadding="6dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -131,7 +126,6 @@
<TextView
android:id="@+id/main_albums_genres"
android:text="@string/main.albums_genres"
- android:drawableRight="@drawable/list_item_more"
android:drawablePadding="6dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -143,7 +137,6 @@
<TextView
android:id="@+id/main_albums_random"
android:text="@string/main.albums_random"
- android:drawableRight="@drawable/list_item_more"
android:drawablePadding="6dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/playlist_list_item.xml b/res/layout/playlist_list_item.xml
index 1ec5753f..80c350f6 100644
--- a/res/layout/playlist_list_item.xml
+++ b/res/layout/playlist_list_item.xml
@@ -17,7 +17,7 @@
<ImageView
android:id="@+id/playlist_more"
- android:src="@drawable/list_item_more"
+ android:src="?attr/download_none"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="right|center_vertical"
diff --git a/res/layout/song_list_item.xml b/res/layout/song_list_item.xml
index 90060894..6d262056 100644
--- a/res/layout/song_list_item.xml
+++ b/res/layout/song_list_item.xml
@@ -87,7 +87,7 @@
<ImageView
android:id="@+id/artist_more"
- android:src="@drawable/list_item_more"
+ android:src="?attr/download_none"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="right|center_vertical"
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 8f669cd2..d2b53374 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -8,5 +8,6 @@
<attr name="media_button_start" format="reference"/>
<attr name="media_button_stop" format="reference"/>
<attr name="chat" format="reference"/>
- <attr name="chat_send" format="reference" />
+ <attr name="chat_send" format="reference" />
+ <attr name="download_none" format="reference" />
</resources>
diff --git a/res/values/themes.xml b/res/values/themes.xml
index 2a4382d4..4735b161 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -12,6 +12,7 @@
<item name="media_button_stop">@drawable/media_stop_light</item>
<item name="chat">@drawable/ic_menu_chat_light</item>
<item name="chat_send">@drawable/ic_menu_chat_send_light</item>
+ <item name="download_none">@drawable/download_none_light</item>
<item name="android:textViewStyle">@style/DSub.TextViewStyle</item>
<item name="android:buttonStyle">@style/DSub.ButtonStyle</item>
</style>
@@ -28,6 +29,7 @@
<item name="media_button_stop">@drawable/media_stop</item>
<item name="chat">@drawable/ic_menu_chat_dark</item>
<item name="chat_send">@drawable/ic_menu_chat_send_dark</item>
+ <item name="download_none">@drawable/download_none_dark</item>
<item name="android:textViewStyle">@style/DSub.TextViewStyle</item>
<item name="android:buttonStyle">@style/DSub.ButtonStyle</item>
</style>
@@ -48,6 +50,7 @@
<item name="media_button_stop">@drawable/media_stop</item>
<item name="chat">@drawable/ic_menu_chat_dark</item>
<item name="chat_send">@drawable/ic_menu_chat_send_dark</item>
+ <item name="download_none">@drawable/download_none_dark</item>
<item name="android:textViewStyle">@style/DSub.TextViewStyle</item>
<item name="android:buttonStyle">@style/DSub.ButtonStyle</item>
</style>
diff --git a/src/github/daneren2005/dsub/view/SongView.java b/src/github/daneren2005/dsub/view/SongView.java
index 8e10a97f..24e2df0f 100644
--- a/src/github/daneren2005/dsub/view/SongView.java
+++ b/src/github/daneren2005/dsub/view/SongView.java
@@ -19,6 +19,7 @@
package github.daneren2005.dsub.view;
import android.content.Context;
+import android.content.res.TypedArray;
import android.media.MediaMetadataRetriever;
import android.util.Log;
import android.view.LayoutInflater;
@@ -42,8 +43,7 @@ import java.text.DateFormat;
*/
public class SongView extends UpdateView implements Checkable {
private static final String TAG = SongView.class.getSimpleName();
-
- private Context context;
+
private MusicDirectory.Entry song;
private CheckedTextView checkedTextView;
@@ -67,7 +67,6 @@ public class SongView extends UpdateView implements Checkable {
public SongView(Context context) {
super(context);
- this.context = context;
LayoutInflater.from(context).inflate(R.layout.song_list_item, this, true);
checkedTextView = (CheckedTextView) findViewById(R.id.song_check);
@@ -197,14 +196,16 @@ public class SongView extends UpdateView implements Checkable {
int rightImage = 0;
if (isWorkDone) {
- int moreImage = isSaved ? R.drawable.list_item_more_saved : R.drawable.list_item_more_shaded;
+ int moreImage = isSaved ? R.drawable.download_pinned : R.drawable.download_cached;
if(moreImage != this.moreImage) {
moreButton.setImageResource(moreImage);
this.moreImage = moreImage;
}
- } else if(this.moreImage != R.drawable.list_item_more) {
- moreButton.setImageResource(R.drawable.list_item_more);
- this.moreImage = R.drawable.list_item_more;
+ } else if(true) {
+ int[] attrs = new int[] {R.attr.download_none};
+ TypedArray typedArray = context.obtainStyledAttributes(attrs);
+ moreButton.setImageResource(typedArray.getResourceId(0, 0));
+ this.moreImage = R.drawable.download_none_light;
}
if (downloadFile.isDownloading() && !downloadFile.isDownloadCancelled() && partialFileExists) {
diff --git a/src/github/daneren2005/dsub/view/UpdateView.java b/src/github/daneren2005/dsub/view/UpdateView.java
index 20f9db9f..05b17417 100644
--- a/src/github/daneren2005/dsub/view/UpdateView.java
+++ b/src/github/daneren2005/dsub/view/UpdateView.java
@@ -19,6 +19,7 @@
package github.daneren2005.dsub.view;
import android.content.Context;
+import android.content.res.TypedArray;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
@@ -41,7 +42,8 @@ public class UpdateView extends LinearLayout {
private static Handler backgroundHandler;
private static Handler uiHandler;
private static Runnable updateRunnable;
-
+
+ protected Context context;
protected ImageButton starButton;
protected ImageView moreButton;
@@ -52,6 +54,7 @@ public class UpdateView extends LinearLayout {
public UpdateView(Context context) {
super(context);
+ this.context = context;
setLayoutParams(new AbsListView.LayoutParams(
ViewGroup.LayoutParams.FILL_PARENT,
@@ -168,12 +171,14 @@ public class UpdateView extends LinearLayout {
if(moreButton != null) {
if(exists) {
if(!shaded) {
- moreButton.setImageResource(R.drawable.list_item_more_shaded);
+ moreButton.setImageResource(R.drawable.download_cached);
shaded = true;
}
} else {
if(shaded) {
- moreButton.setImageResource(R.drawable.list_item_more);
+ int[] attrs = new int[] {R.attr.download_none};
+ TypedArray typedArray = context.obtainStyledAttributes(attrs);
+ moreButton.setImageResource(typedArray.getResourceId(0, 0));
shaded = false;
}
}