aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2012-11-10 20:56:59 -0800
committerScott Jackson <daneren2005@gmail.com>2012-11-10 20:56:59 -0800
commit4e4dc1bb43066da355da90c1f2c220a9b4e56e23 (patch)
treeb56eaa4ac248a95a9e31556bd7ae2527e342fddc /subsonic-android
parent233b0cbc21eca5df2d9ce6dc17331cf07eb6da4d (diff)
downloaddsub-4e4dc1bb43066da355da90c1f2c220a9b4e56e23.tar.gz
dsub-4e4dc1bb43066da355da90c1f2c220a9b4e56e23.tar.bz2
dsub-4e4dc1bb43066da355da90c1f2c220a9b4e56e23.zip
Added quick context menu arrows to song view as well #47
Diffstat (limited to 'subsonic-android')
-rw-r--r--subsonic-android/res/layout/song_list_item.xml11
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/view/SongView.java13
2 files changed, 19 insertions, 5 deletions
diff --git a/subsonic-android/res/layout/song_list_item.xml b/subsonic-android/res/layout/song_list_item.xml
index e7c2aabb..9bbfde94 100644
--- a/subsonic-android/res/layout/song_list_item.xml
+++ b/subsonic-android/res/layout/song_list_item.xml
@@ -81,5 +81,14 @@
android:paddingRight="9dip"/>
</LinearLayout>
- </LinearLayout>
+ </LinearLayout>
+
+ <ImageView
+ android:id="@+id/artist_more"
+ android:src="@drawable/list_item_more"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:layout_gravity="right|center_vertical"
+ android:paddingRight="6dip"
+ android:background="@drawable/menubar_button"/>
</LinearLayout>
diff --git a/subsonic-android/src/github/daneren2005/dsub/view/SongView.java b/subsonic-android/src/github/daneren2005/dsub/view/SongView.java
index 9e69bb49..f1701822 100644
--- a/subsonic-android/src/github/daneren2005/dsub/view/SongView.java
+++ b/subsonic-android/src/github/daneren2005/dsub/view/SongView.java
@@ -21,10 +21,7 @@ package github.daneren2005.dsub.view;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
-import android.widget.Checkable;
-import android.widget.CheckedTextView;
-import android.widget.ImageButton;
-import android.widget.TextView;
+import android.widget.*;
import github.daneren2005.dsub.R;
import github.daneren2005.dsub.domain.MusicDirectory;
import github.daneren2005.dsub.service.DownloadService;
@@ -51,6 +48,7 @@ public class SongView extends UpdateView implements Checkable {
private TextView durationTextView;
private TextView statusTextView;
private ImageButton starButton;
+ private ImageView moreButton;
public SongView(Context context) {
super(context);
@@ -90,6 +88,13 @@ public class SongView extends UpdateView implements Checkable {
checkedTextView.setVisibility(checkable && !song.isVideo() ? View.VISIBLE : View.GONE);
starButton.setVisibility((Util.isOffline(getContext()) || !song.isStarred()) ? View.GONE : View.VISIBLE);
starButton.setFocusable(false);
+
+ moreButton = (ImageView) findViewById(R.id.artist_more);
+ moreButton.setOnClickListener(new View.OnClickListener() {
+ public void onClick(View v) {
+ v.showContextMenu();
+ }
+ });
update();
}