update the breadcrumb color if it was changed

This commit is contained in:
tibbi
2017-03-16 00:10:56 +01:00
parent 0dfd868d71
commit 6be55d391a
2 changed files with 12 additions and 1 deletions

View File

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

View File

@ -29,6 +29,7 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
var mBasePath = getInternalStoragePath() var mBasePath = getInternalStoragePath()
var latestFragment: ItemsFragment? = null var latestFragment: ItemsFragment? = null
var mScrollStates = HashMap<String, Parcelable>() var mScrollStates = HashMap<String, Parcelable>()
var mStoredTextColor = 0
companion object { companion object {
private val STORAGE_PERMISSION = 1 private val STORAGE_PERMISSION = 1
@ -48,6 +49,16 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
updateTextColors(main_screen) updateTextColors(main_screen)
if (mStoredTextColor != config.textColor) {
mStoredTextColor = config.textColor
breadcrumbs.setTextColor(mStoredTextColor)
initRootFileManager()
}
}
override fun onPause() {
super.onPause()
mStoredTextColor = config.textColor
} }
override fun onDestroy() { override fun onDestroy() {