From 7e755611b069cbf57864db5925ab055e1bb08329 Mon Sep 17 00:00:00 2001 From: Prathamesh More Date: Mon, 20 Sep 2021 16:09:57 +0530 Subject: [PATCH] Fixed queue reordering --- .../fragments/playlists/PlaylistDetailsFragment.kt | 2 +- app/src/main/res/drawable/ic_drag_handle.xml | 10 ++++++++++ app/src/main/res/layout/item_queue.xml | 13 +++++-------- 3 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 app/src/main/res/drawable/ic_drag_handle.xml diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/playlists/PlaylistDetailsFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/playlists/PlaylistDetailsFragment.kt index 8edc235f..835785f0 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/playlists/PlaylistDetailsFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/playlists/PlaylistDetailsFragment.kt @@ -82,7 +82,7 @@ class PlaylistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playli playlist.playlistEntity, requireActivity(), ArrayList(), - R.layout.item_list, + R.layout.item_queue, this ) diff --git a/app/src/main/res/drawable/ic_drag_handle.xml b/app/src/main/res/drawable/ic_drag_handle.xml new file mode 100644 index 00000000..88fe5b40 --- /dev/null +++ b/app/src/main/res/drawable/ic_drag_handle.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/layout/item_queue.xml b/app/src/main/res/layout/item_queue.xml index 1c401f9d..305cb28a 100644 --- a/app/src/main/res/layout/item_queue.xml +++ b/app/src/main/res/layout/item_queue.xml @@ -4,22 +4,19 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?rectSelector" android:clickable="true" - android:focusable="true"> - + android:focusable="true" + android:transitionGroup="true"> - @@ -27,15 +24,16 @@ @@ -44,7 +42,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:layout_marginStart="16dp" app:cardCornerRadius="6dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toEndOf="@id/drag_view"