properly update all elements if some colors change

This commit is contained in:
tibbi 2017-10-22 21:34:29 +02:00
parent 72fb8256d1
commit 2969314cc9
4 changed files with 10 additions and 10 deletions

View File

@ -37,7 +37,7 @@ android {
}
dependencies {
compile 'com.simplemobiletools:commons:2.30.9'
compile 'com.simplemobiletools:commons:2.30.10'
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

View File

@ -176,7 +176,7 @@ class MainActivity : SimpleActivity() {
}
} else {
fragment.breadcrumbs.removeBreadcrumb()
openPath(fragment.breadcrumbs.lastItem.path)
openPath(fragment.breadcrumbs.getLastItem().path)
}
}

View File

@ -13,10 +13,7 @@ import android.view.View
import android.view.ViewGroup
import android.webkit.MimeTypeMap
import com.simplemobiletools.commons.dialogs.StoragePickerDialog
import com.simplemobiletools.commons.extensions.deleteFiles
import com.simplemobiletools.commons.extensions.getFilenameExtension
import com.simplemobiletools.commons.extensions.getFilenameFromPath
import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.models.FileDirItem
import com.simplemobiletools.commons.views.Breadcrumbs
import com.simplemobiletools.commons.views.MyScalableRecyclerView
@ -67,11 +64,15 @@ class ItemsFragment : Fragment(), ItemsAdapter.ItemOperationsListener, Breadcrum
refreshItems()
}
if (storedTextColor != config.textColor) {
context.updateTextColors(mView as ViewGroup)
mView.items_fastscroller.updateHandleColor()
val newColor = config.textColor
if (storedTextColor != newColor) {
storedItems = ArrayList()
(items_list.adapter as ItemsAdapter).updateTextColor(config.textColor)
(items_list.adapter as ItemsAdapter).updateTextColor(newColor)
mView.breadcrumbs.updateColor(newColor)
refreshItems()
storedTextColor = config.textColor
storedTextColor = newColor
}
}

View File

@ -50,7 +50,6 @@
android:background="@drawable/fastscroller_handle_vertical"/>
</com.simplemobiletools.commons.views.FastScroller>
</RelativeLayout>
</android.support.v4.widget.SwipeRefreshLayout>
<com.simplemobiletools.commons.views.MyFloatingActionButton