From 0e1c94827800ee3ff28ef37ebb30f967e85225e1 Mon Sep 17 00:00:00 2001 From: Adrian Ulrich Date: Thu, 16 Oct 2014 17:02:56 +0200 Subject: [PATCH] remove padding due to draglist bug and make showqueue dragable --- res/layout/playlist_row.xml | 1 - res/layout/showqueue_listview.xml | 2 +- res/layout/showqueue_row.xml | 6 ++++-- res/layout/tab_order_row.xml | 1 - .../android/vanilla/DragListView.java | 2 +- .../android/vanilla/ShowQueueActivity.java | 5 +++-- .../android/vanilla/ShowQueueAdapter.java | 19 ++++++++++++++++--- 7 files changed, 25 insertions(+), 11 deletions(-) diff --git a/res/layout/playlist_row.xml b/res/layout/playlist_row.xml index 889397b5..2512b769 100644 --- a/res/layout/playlist_row.xml +++ b/res/layout/playlist_row.xml @@ -22,7 +22,6 @@ THE SOFTWARE. --> diff --git a/res/layout/showqueue_listview.xml b/res/layout/showqueue_listview.xml index 4b3c8c89..76936c41 100644 --- a/res/layout/showqueue_listview.xml +++ b/res/layout/showqueue_listview.xml @@ -1,5 +1,5 @@ - diff --git a/res/layout/tab_order_row.xml b/res/layout/tab_order_row.xml index 5545341e..e9bc2c2c 100644 --- a/res/layout/tab_order_row.xml +++ b/res/layout/tab_order_row.xml @@ -22,7 +22,6 @@ THE SOFTWARE. --> { +public class ShowQueueAdapter + extends ArrayAdapter + implements DragListView.DragAdapter { int resource; Context context; @@ -70,8 +73,18 @@ public class ShowQueueAdapter extends ArrayAdapter { View pmark = ((View)row.findViewById(R.id.playmark)); pmark.setVisibility( ( position == this.hl_row ? View.VISIBLE : View.INVISIBLE )); - + return row; } - + + @Override + public void remove(int position) { + // not implemented + } + + @Override + public void move(int from, int to) { + Log.v("VanillaMusic", "Moved FROM "+from+" to "+to); + } + }