adding some Select all cab menu items
This commit is contained in:
parent
0a9fa237fb
commit
c834952809
14 changed files with 47 additions and 6 deletions
|
@ -58,6 +58,7 @@ class AlbumsAdapter(activity: SimpleActivity, var albums: ArrayList<Album>, recy
|
|||
R.id.cab_add_to_playlist -> addToPlaylist()
|
||||
R.id.cab_add_to_queue -> addToQueue()
|
||||
R.id.cab_delete -> askConfirmDelete()
|
||||
R.id.cab_select_all -> selectAll()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -93,6 +93,7 @@ class AlbumsTracksAdapter(activity: SimpleActivity, val items: ArrayList<ListIte
|
|||
R.id.cab_add_to_playlist -> addToPlaylist()
|
||||
R.id.cab_add_to_queue -> addToQueue()
|
||||
R.id.cab_delete -> askConfirmDelete()
|
||||
R.id.cab_select_all -> selectAll()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ class ArtistsAdapter(activity: SimpleActivity, var artists: ArrayList<Artist>, r
|
|||
R.id.cab_add_to_playlist -> addToPlaylist()
|
||||
R.id.cab_add_to_queue -> addToQueue()
|
||||
R.id.cab_delete -> askConfirmDelete()
|
||||
R.id.cab_select_all -> selectAll()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import com.simplemobiletools.commons.extensions.deleteFiles
|
|||
import com.simplemobiletools.commons.extensions.getFilenameFromPath
|
||||
import com.simplemobiletools.commons.extensions.highlightTextPart
|
||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||
import com.simplemobiletools.commons.helpers.mydebug
|
||||
import com.simplemobiletools.commons.models.FileDirItem
|
||||
import com.simplemobiletools.commons.views.FastScroller
|
||||
import com.simplemobiletools.commons.views.MyRecyclerView
|
||||
|
@ -57,6 +56,7 @@ class PlaylistsAdapter(activity: SimpleActivity, var playlists: ArrayList<Playli
|
|||
when (id) {
|
||||
R.id.cab_delete -> askConfirmDelete()
|
||||
R.id.cab_rename -> showRenameDialog()
|
||||
R.id.cab_select_all -> selectAll()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import kotlinx.android.synthetic.main.item_track_queue.view.*
|
|||
import java.util.*
|
||||
|
||||
class QueueAdapter(activity: SimpleActivity, val items: ArrayList<Track>, recyclerView: MyRecyclerView, fastScroller: FastScroller, itemClick: (Any) -> Unit) :
|
||||
MyRecyclerViewAdapter(activity, recyclerView, fastScroller, itemClick), ItemTouchHelperContract {
|
||||
MyRecyclerViewAdapter(activity, recyclerView, fastScroller, itemClick), ItemTouchHelperContract {
|
||||
|
||||
private val placeholder = resources.getColoredDrawableWithColor(R.drawable.ic_headset, textColor)
|
||||
private var startReorderDragListener: StartReorderDragListener
|
||||
|
@ -79,6 +79,7 @@ class QueueAdapter(activity: SimpleActivity, val items: ArrayList<Track>, recycl
|
|||
when (id) {
|
||||
R.id.cab_remove_from_queue -> removeFromQueue()
|
||||
R.id.cab_add_to_playlist -> addToPlaylist()
|
||||
R.id.cab_select_all -> selectAll()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,6 +70,7 @@ class TracksAdapter(activity: SimpleActivity, var tracks: ArrayList<Track>, val
|
|||
R.id.cab_properties -> showProperties()
|
||||
R.id.cab_remove_from_playlist -> removeFromPlaylist()
|
||||
R.id.cab_delete -> askConfirmDelete()
|
||||
R.id.cab_select_all -> selectAll()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -84,6 +84,7 @@ class TracksHeaderAdapter(activity: SimpleActivity, val items: ArrayList<ListIte
|
|||
R.id.cab_add_to_playlist -> addToPlaylist()
|
||||
R.id.cab_add_to_queue -> addToQueue()
|
||||
R.id.cab_delete -> askConfirmDelete()
|
||||
R.id.cab_select_all -> selectAll()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,4 +14,9 @@
|
|||
android:id="@+id/cab_add_to_queue"
|
||||
android:title="@string/add_to_queue"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/cab_select_all"
|
||||
android:icon="@drawable/ic_select_all_vector"
|
||||
android:title="@string/select_all"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
||||
|
|
|
@ -14,4 +14,9 @@
|
|||
android:id="@+id/cab_add_to_queue"
|
||||
android:title="@string/add_to_queue"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/cab_select_all"
|
||||
android:icon="@drawable/ic_select_all_vector"
|
||||
android:title="@string/select_all"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
||||
|
|
|
@ -14,4 +14,9 @@
|
|||
android:id="@+id/cab_add_to_queue"
|
||||
android:title="@string/add_to_queue"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/cab_select_all"
|
||||
android:icon="@drawable/ic_select_all_vector"
|
||||
android:title="@string/select_all"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/cab_rename"
|
||||
android:icon="@drawable/ic_rename_new"
|
||||
android:title="@string/rename"
|
||||
app:showAsAction="ifRoom"/>
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/cab_delete"
|
||||
android:icon="@drawable/ic_delete_vector"
|
||||
android:title="@string/delete"
|
||||
app:showAsAction="ifRoom"/>
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/cab_select_all"
|
||||
android:icon="@drawable/ic_select_all_vector"
|
||||
android:title="@string/select_all"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
||||
|
|
|
@ -10,4 +10,9 @@
|
|||
android:id="@+id/cab_add_to_playlist"
|
||||
android:title="@string/add_to_playlist"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/cab_select_all"
|
||||
android:icon="@drawable/ic_select_all_vector"
|
||||
android:title="@string/select_all"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
android:id="@+id/cab_properties"
|
||||
android:icon="@drawable/ic_info"
|
||||
android:title="@string/properties"
|
||||
app:showAsAction="ifRoom"/>
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/cab_add_to_playlist"
|
||||
android:title="@string/add_to_playlist"
|
||||
|
@ -24,4 +24,9 @@
|
|||
android:id="@+id/cab_add_to_queue"
|
||||
android:title="@string/add_to_queue"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/cab_select_all"
|
||||
android:icon="@drawable/ic_select_all_vector"
|
||||
android:title="@string/select_all"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
||||
|
|
|
@ -14,4 +14,9 @@
|
|||
android:id="@+id/cab_add_to_queue"
|
||||
android:title="@string/add_to_queue"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/cab_select_all"
|
||||
android:icon="@drawable/ic_select_all_vector"
|
||||
android:title="@string/select_all"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
||||
|
|
Loading…
Reference in a new issue