update commons to 4.4.19

This commit is contained in:
tibbi 2018-07-15 23:27:09 +02:00
parent aaedf736b3
commit 8a69833a0b
6 changed files with 19 additions and 15 deletions

View file

@ -46,12 +46,12 @@ ext {
}
dependencies {
implementation 'com.simplemobiletools:commons:4.1.7'
implementation 'com.simplemobiletools:commons:4.4.19'
implementation 'com.squareup:otto:1.3.8'
kapt "android.arch.persistence.room:compiler:1.1.0"
implementation "android.arch.persistence.room:runtime:1.1.0"
annotationProcessor "android.arch.persistence.room:compiler:1.1.0"
kapt "android.arch.persistence.room:compiler:1.1.1"
implementation "android.arch.persistence.room:runtime:1.1.1"
annotationProcessor "android.arch.persistence.room:compiler:1.1.1"
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"

View file

@ -30,17 +30,17 @@ class PlaylistsAdapter(activity: SimpleActivity, val playlists: ArrayList<Playli
override fun getActionMenuId() = R.menu.cab_playlists
override fun prepareItemSelection(view: View) {}
override fun prepareItemSelection(viewHolder: ViewHolder) {}
override fun markItemSelection(select: Boolean, view: View?) {
view?.playlist_frame?.isSelected = select
override fun markViewHolderSelection(select: Boolean, viewHolder: ViewHolder?) {
viewHolder?.itemView?.playlist_frame?.isSelected = select
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_playlist, parent)
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
val playlist = playlists[position]
val view = holder.bindView(playlist) { itemView, layoutPosition ->
val view = holder.bindView(playlist, true, true) { itemView, layoutPosition ->
setupView(itemView, playlist)
}
bindViewHolder(holder, position, view)
@ -63,6 +63,8 @@ class PlaylistsAdapter(activity: SimpleActivity, val playlists: ArrayList<Playli
override fun getSelectableItemCount() = playlists.size
override fun getIsItemSelectable(position: Int) = true
private fun askConfirmDelete() {
RemovePlaylistDialog(activity) {
val ids = selectedPositions.map { playlists[it].id } as ArrayList<Int>

View file

@ -58,10 +58,10 @@ class SongAdapter(activity: SimpleActivity, var songs: ArrayList<Song>, val list
override fun getActionMenuId() = R.menu.cab
override fun prepareItemSelection(view: View) {}
override fun prepareItemSelection(viewHolder: ViewHolder) {}
override fun markItemSelection(select: Boolean, view: View?) {
view?.song_frame?.isSelected = select
override fun markViewHolderSelection(select: Boolean, viewHolder: ViewHolder?) {
viewHolder?.itemView?.song_frame?.isSelected = select
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
@ -83,7 +83,7 @@ class SongAdapter(activity: SimpleActivity, var songs: ArrayList<Song>, val list
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
if (holder !is TransparentViewHolder && holder !is NavigationViewHolder) {
val song = songs[position - LIST_HEADERS_COUNT]
val view = holder.bindView(song, !isThirdPartyIntent) { itemView, layoutPosition ->
val view = holder.bindView(song, true, !isThirdPartyIntent) { itemView, layoutPosition ->
setupView(itemView, song, layoutPosition)
}
bindViewHolder(holder, position - LIST_HEADERS_COUNT, view)
@ -113,6 +113,8 @@ class SongAdapter(activity: SimpleActivity, var songs: ArrayList<Song>, val list
override fun getSelectableItemCount() = songs.size
override fun getIsItemSelectable(position: Int) = position >= 0
fun searchOpened() {
transparentViewHeight = transparentView.height
transparentView.layoutParams?.height = 0

View file

@ -8,7 +8,7 @@
app:showAsAction="ifRoom"/>
<item
android:id="@+id/cab_rename"
android:icon="@drawable/ic_rename"
android:icon="@drawable/ic_rename_new"
android:title="@string/rename"
app:showAsAction="ifRoom"/>
<item

View file

@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/cab_rename"
android:icon="@drawable/ic_rename"
android:icon="@drawable/ic_rename_new"
android:title="@string/rename"
app:showAsAction="ifRoom"/>
<item

View file

@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.41'
ext.kotlin_version = '1.2.51'
repositories {
jcenter()