Added a drag view to playlist songs for easier rearrangement
This commit is contained in:
parent
a83e54c37f
commit
29f91b6969
11 changed files with 34 additions and 2 deletions
|
|
@ -28,7 +28,8 @@
|
||||||
<h3>Version 0.9.46 beta 2</h3>
|
<h3>Version 0.9.46 beta 2</h3>
|
||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
<li><b>FIX:</b> Cab (contextual action bar) content not visible with light primary colors</li>
|
<li><b>NEW:</b> Added a drag view to playlist songs for easier rearrangement.</li>
|
||||||
|
<li><b>FIX:</b> Cab (contextual action bar) content not visible with light primary colors.</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<h3>Version 0.9.46 beta 1</h3>
|
<h3>Version 0.9.46 beta 1</h3>
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,10 @@ public abstract class MediaEntryViewHolder extends RecyclerView.ViewHolder imple
|
||||||
@Bind(R.id.selected_indicator)
|
@Bind(R.id.selected_indicator)
|
||||||
public View selectedIndicator;
|
public View selectedIndicator;
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Bind(R.id.drag_view)
|
||||||
|
public View dragView;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Bind(R.id.palette_color_container)
|
@Bind(R.id.palette_color_container)
|
||||||
public View paletteColorContainer;
|
public View paletteColorContainer;
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,9 @@ public class PlaylistSongAdapter extends SongAdapter {
|
||||||
|
|
||||||
public ViewHolder(@NonNull View itemView) {
|
public ViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
if (dragView != null) {
|
||||||
|
dragView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ public class PlaylistDetailActivity extends AbsSlidingMusicPanelActivity impleme
|
||||||
adapter = new PlaylistSongAdapter(this, loadPlaylistDataSet(), R.layout.item_list, false, this);
|
adapter = new PlaylistSongAdapter(this, loadPlaylistDataSet(), R.layout.item_list, false, this);
|
||||||
|
|
||||||
DragSortRecycler dragSortRecycler = new DragSortRecycler();
|
DragSortRecycler dragSortRecycler = new DragSortRecycler();
|
||||||
dragSortRecycler.setViewHandleId(R.id.image);
|
dragSortRecycler.setViewHandleId(R.id.drag_view);
|
||||||
dragSortRecycler.setOnItemMovedListener(new DragSortRecycler.OnItemMovedListener() {
|
dragSortRecycler.setOnItemMovedListener(new DragSortRecycler.OnItemMovedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemMoved(int from, int to) {
|
public void onItemMoved(int from, int to) {
|
||||||
|
|
|
||||||
BIN
app/src/main/res/drawable-hdpi/ic_equal_white_24dp.png
Normal file
BIN
app/src/main/res/drawable-hdpi/ic_equal_white_24dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 172 B |
BIN
app/src/main/res/drawable-mdpi/ic_equal_white_24dp.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_equal_white_24dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 162 B |
BIN
app/src/main/res/drawable-xhdpi/ic_equal_white_24dp.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_equal_white_24dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 176 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_equal_white_24dp.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_equal_white_24dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 206 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_equal_white_24dp.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/ic_equal_white_24dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 231 B |
|
|
@ -6,6 +6,18 @@
|
||||||
android:foreground="?rect_selector"
|
android:foreground="?rect_selector"
|
||||||
tools:ignore="UnusedAttribute">
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:visibility="gone"
|
||||||
|
android:id="@+id/drag_view"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical|start"
|
||||||
|
android:layout_marginLeft="-12dp"
|
||||||
|
android:layout_marginStart="-12dp"
|
||||||
|
android:src="@drawable/ic_equal_white_24dp"
|
||||||
|
android:tint="?icon_color"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,18 @@
|
||||||
android:foreground="?rect_selector"
|
android:foreground="?rect_selector"
|
||||||
tools:ignore="UnusedAttribute">
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:visibility="gone"
|
||||||
|
android:id="@+id/drag_view"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical|start"
|
||||||
|
android:layout_marginLeft="-12dp"
|
||||||
|
android:layout_marginStart="-12dp"
|
||||||
|
android:src="@drawable/ic_equal_white_24dp"
|
||||||
|
android:tint="?icon_color"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue