add Commons lib
This commit is contained in:
parent
c70ab43e80
commit
f4957d43cd
6 changed files with 8 additions and 46 deletions
|
@ -36,13 +36,8 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:appcompat-v7:25.0.1'
|
||||
compile 'com.android.support:design:25.0.1'
|
||||
compile 'com.simplemobiletools:commons:2.1.9'
|
||||
compile 'com.squareup:otto:1.3.8'
|
||||
compile 'com.github.yukuku:ambilwarna:2.0.1'
|
||||
compile 'com.simplemobiletools:filepicker:1.5.5@aar'
|
||||
compile 'com.simplemobiletools:fileproperties:1.0.7@aar'
|
||||
compile 'com.github.bumptech.glide:glide:3.7.0' // remove when https://github.com/bumptech/glide/issues/882 is fixed
|
||||
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@ import android.view.Menu
|
|||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.widget.SeekBar
|
||||
import com.simplemobiletools.filepicker.extensions.toast
|
||||
import com.simplemobiletools.filepicker.views.RecyclerViewDivider
|
||||
import com.simplemobiletools.commons.extensions.toast
|
||||
import com.simplemobiletools.commons.views.RecyclerViewDivider
|
||||
import com.simplemobiletools.musicplayer.R
|
||||
import com.simplemobiletools.musicplayer.adapters.SongAdapter
|
||||
import com.simplemobiletools.musicplayer.dialogs.ChangeSortingDialog
|
||||
|
|
|
@ -8,9 +8,9 @@ import android.view.*
|
|||
import com.bignerdranch.android.multiselector.ModalMultiSelectorCallback
|
||||
import com.bignerdranch.android.multiselector.MultiSelector
|
||||
import com.bignerdranch.android.multiselector.SwappingHolder
|
||||
import com.simplemobiletools.filepicker.dialogs.ConfirmationDialog
|
||||
import com.simplemobiletools.filepicker.extensions.scanPaths
|
||||
import com.simplemobiletools.fileproperties.dialogs.PropertiesDialog
|
||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||
import com.simplemobiletools.commons.dialogs.PropertiesDialog
|
||||
import com.simplemobiletools.commons.extensions.scanPaths
|
||||
import com.simplemobiletools.musicplayer.R
|
||||
import com.simplemobiletools.musicplayer.activities.SimpleActivity
|
||||
import com.simplemobiletools.musicplayer.dialogs.EditDialog
|
||||
|
|
|
@ -7,7 +7,7 @@ import android.net.Uri
|
|||
import android.provider.MediaStore
|
||||
import android.view.LayoutInflater
|
||||
import android.view.WindowManager
|
||||
import com.simplemobiletools.filepicker.extensions.*
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.musicplayer.R
|
||||
import com.simplemobiletools.musicplayer.activities.SimpleActivity
|
||||
import com.simplemobiletools.musicplayer.models.Song
|
||||
|
|
|
@ -21,7 +21,7 @@ import android.support.v7.app.NotificationCompat
|
|||
import android.telephony.PhoneStateListener
|
||||
import android.telephony.TelephonyManager
|
||||
import android.util.Log
|
||||
import com.simplemobiletools.filepicker.extensions.toast
|
||||
import com.simplemobiletools.commons.extensions.toast
|
||||
import com.simplemobiletools.musicplayer.R
|
||||
import com.simplemobiletools.musicplayer.activities.MainActivity
|
||||
import com.simplemobiletools.musicplayer.helpers.*
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
package com.simplemobiletools.musicplayer.views
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Canvas
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.support.v7.widget.RecyclerView
|
||||
import com.simplemobiletools.musicplayer.R
|
||||
|
||||
class RecyclerViewDivider(context: Context) : RecyclerView.ItemDecoration() {
|
||||
private val mDivider: Drawable
|
||||
|
||||
init {
|
||||
mDivider = context.resources.getDrawable(R.drawable.divider)
|
||||
}
|
||||
|
||||
override fun onDrawOver(c: Canvas, parent: RecyclerView, state: RecyclerView.State) {
|
||||
val left = parent.paddingLeft
|
||||
val right = parent.width - parent.paddingRight
|
||||
|
||||
val childCount = parent.childCount
|
||||
for (i in 0..childCount - 1) {
|
||||
val child = parent.getChildAt(i)
|
||||
|
||||
val params = child.layoutParams as RecyclerView.LayoutParams
|
||||
|
||||
val top = child.bottom + params.bottomMargin
|
||||
val bottom = top + mDivider.intrinsicHeight
|
||||
|
||||
mDivider.setBounds(left, top, right, bottom)
|
||||
mDivider.draw(c)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue