update commons to 3.6.3

This commit is contained in:
tibbi 2018-01-07 21:16:48 +01:00
parent 5214659295
commit efcce9fd5b
6 changed files with 9 additions and 7 deletions

View file

@ -41,7 +41,7 @@ ext {
}
dependencies {
implementation 'com.simplemobiletools:commons:3.4.15'
implementation 'com.simplemobiletools:commons:3.6.3'
implementation files('../libs/RootTools.jar')

View file

@ -20,6 +20,7 @@ import com.simplemobiletools.commons.dialogs.PropertiesDialog
import com.simplemobiletools.commons.dialogs.RenameItemDialog
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.models.FileDirItem
import com.simplemobiletools.commons.views.FastScroller
import com.simplemobiletools.commons.views.MyRecyclerView
import com.simplemobiletools.filemanager.R
import com.simplemobiletools.filemanager.activities.SimpleActivity
@ -36,7 +37,8 @@ import java.util.zip.ZipFile
import java.util.zip.ZipOutputStream
class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList<FileDirItem>, val listener: ItemOperationsListener?, recyclerView: MyRecyclerView,
val isPickMultipleIntent: Boolean, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, itemClick) {
val isPickMultipleIntent: Boolean, fastScroller: FastScroller, itemClick: (Any) -> Unit) :
MyRecyclerViewAdapter(activity, recyclerView, fastScroller, itemClick) {
lateinit private var folderDrawable: Drawable
lateinit private var fileDrawable: Drawable
@ -379,7 +381,7 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList<FileD
override fun onViewRecycled(holder: ViewHolder?) {
super.onViewRecycled(holder)
if (!activity.isActivityDestroyed()) {
Glide.with(activity).clear(holder?.itemView?.item_icon)
Glide.with(activity).clear(holder?.itemView?.item_icon!!)
}
}

View file

@ -13,7 +13,7 @@ import com.simplemobiletools.filemanager.extensions.config
import kotlinx.android.synthetic.main.item_manage_favorite.view.*
class ManageFavoritesAdapter(activity: BaseSimpleActivity, var favorites: ArrayList<String>, val listener: RefreshRecyclerViewListener?,
recyclerView: MyRecyclerView, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, itemClick) {
recyclerView: MyRecyclerView, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, null, itemClick) {
private val config = activity.config

View file

@ -138,7 +138,7 @@ class ItemsFragment : Fragment(), ItemsAdapter.ItemOperationsListener, Breadcrum
storedItems = items
val currAdapter = items_list.adapter
if (currAdapter == null) {
ItemsAdapter(activity as SimpleActivity, storedItems, this@ItemsFragment, items_list, isPickMultipleIntent) {
ItemsAdapter(activity as SimpleActivity, storedItems, this@ItemsFragment, items_list, isPickMultipleIntent, items_fastscroller) {
itemClicked(it as FileDirItem)
}.apply {
setupDragListener(true)

View file

@ -25,7 +25,7 @@
<com.simplemobiletools.commons.views.MyRecyclerView
android:id="@+id/items_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_below="@+id/breadcrumbs"
android:clipToPadding="false"
android:scrollbars="none"

View file

@ -30,7 +30,7 @@
android:layout_alignTop="@+id/item_icon"
android:layout_toRightOf="@+id/item_icon"
android:ellipsize="end"
android:maxLines="3"
android:maxLines="1"
android:paddingLeft="@dimen/small_margin"
android:paddingTop="@dimen/small_margin"
tools:text="Directory"/>