diff --git a/app/build.gradle b/app/build.gradle index 36a42465f..f2e254506 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -61,7 +61,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.7.7' + implementation 'com.simplemobiletools:commons:5.7.9' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'androidx.multidex:multidex:2.0.1' implementation 'it.sephiroth.android.exif:library:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt index fd581e8ef..74a08ee54 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt @@ -575,6 +575,8 @@ class SettingsActivity : SimpleActivity() { put(APP_ICON_COLOR, config.appIconColor) put(USE_ENGLISH, config.useEnglish) put(WAS_USE_ENGLISH_TOGGLED, config.wasUseEnglishToggled) + put(WIDGET_BG_COLOR, config.widgetBgColor) + put(WIDGET_TEXT_COLOR, config.widgetTextColor) put(INCLUDED_FOLDERS, TextUtils.join(",", config.includedFolders)) put(EXCLUDED_FOLDERS, TextUtils.join(",", config.excludedFolders)) put(SHOW_HIDDEN_MEDIA, config.showHiddenMedia) @@ -625,8 +627,6 @@ class SettingsActivity : SimpleActivity() { put(MEDIA_COLUMN_CNT, config.mediaColumnCnt) put(SHOW_ALL, config.showAll) put(SHOW_WIDGET_FOLDER_NAME, config.showWidgetFolderName) - put(WIDGET_BG_COLOR, config.widgetBgColor) - put(WIDGET_TEXT_COLOR, config.widgetTextColor) put(VIEW_TYPE_FILES, config.viewTypeFiles) put(VIEW_TYPE_FOLDERS, config.viewTypeFolders) put(SLIDESHOW_INTERVAL, config.slideshowInterval) @@ -695,6 +695,8 @@ class SettingsActivity : SimpleActivity() { } USE_ENGLISH -> config.useEnglish = value.toBoolean() WAS_USE_ENGLISH_TOGGLED -> config.wasUseEnglishToggled = value.toBoolean() + WIDGET_BG_COLOR -> config.widgetBgColor = value.toInt() + WIDGET_TEXT_COLOR -> config.widgetTextColor = value.toInt() INCLUDED_FOLDERS -> config.addIncludedFolders(value.toStringSet()) EXCLUDED_FOLDERS -> config.addExcludedFolders(value.toStringSet()) SHOW_HIDDEN_MEDIA -> config.showHiddenMedia = value.toBoolean() @@ -745,8 +747,6 @@ class SettingsActivity : SimpleActivity() { MEDIA_COLUMN_CNT -> config.mediaColumnCnt = value.toInt() SHOW_ALL -> config.showAll = value.toBoolean() SHOW_WIDGET_FOLDER_NAME -> config.showWidgetFolderName = value.toBoolean() - WIDGET_BG_COLOR -> config.widgetBgColor = value.toInt() - WIDGET_TEXT_COLOR -> config.widgetTextColor = value.toInt() VIEW_TYPE_FILES -> config.viewTypeFiles = value.toInt() VIEW_TYPE_FOLDERS -> config.viewTypeFolders = value.toInt() SLIDESHOW_INTERVAL -> config.slideshowInterval = value.toInt() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt index 3a9050af2..20feaa695 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt @@ -66,12 +66,7 @@ class WidgetConfigureActivity : SimpleActivity() { private fun initVariables() { mBgColor = config.widgetBgColor - if (mBgColor == 1) { - mBgColor = Color.BLACK - mBgAlpha = .2f - } else { - mBgAlpha = Color.alpha(mBgColor) / 255f - } + mBgAlpha = Color.alpha(mBgColor) / 255f mBgColorWithoutTransparency = Color.rgb(Color.red(mBgColor), Color.green(mBgColor), Color.blue(mBgColor)) config_bg_seekbar.apply {