diff --git a/library/src/main/kotlin/com/simplemobiletools/commons/activities/BaseSimpleActivity.kt b/library/src/main/kotlin/com/simplemobiletools/commons/activities/BaseSimpleActivity.kt index 576524de8..6c056316e 100644 --- a/library/src/main/kotlin/com/simplemobiletools/commons/activities/BaseSimpleActivity.kt +++ b/library/src/main/kotlin/com/simplemobiletools/commons/activities/BaseSimpleActivity.kt @@ -20,6 +20,7 @@ open class BaseSimpleActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { baseConfig = BaseConfig.newInstance(applicationContext) + updateBackgroundColor() super.onCreate(savedInstanceState) } @@ -33,6 +34,10 @@ open class BaseSimpleActivity : AppCompatActivity() { } } + fun updateBackgroundColor() { + window.decorView.setBackgroundColor(baseConfig.backgroundColor) + } + override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) { super.onActivityResult(requestCode, resultCode, resultData) if (requestCode == OPEN_DOCUMENT_TREE && resultCode == Activity.RESULT_OK && resultData != null) { diff --git a/library/src/main/kotlin/com/simplemobiletools/commons/activities/CustomizationActivity.kt b/library/src/main/kotlin/com/simplemobiletools/commons/activities/CustomizationActivity.kt index d44047590..d07ea905a 100644 --- a/library/src/main/kotlin/com/simplemobiletools/commons/activities/CustomizationActivity.kt +++ b/library/src/main/kotlin/com/simplemobiletools/commons/activities/CustomizationActivity.kt @@ -44,6 +44,7 @@ class CustomizationActivity : BaseSimpleActivity() { override fun onOk(dialog: AmbilWarnaDialog, color: Int) { baseConfig.backgroundColor = color setupColors() + updateBackgroundColor() } }).show() }