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 dea54cf27..899f59629 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 @@ -11,6 +11,8 @@ import com.simplemobiletools.commons.dialogs.ColorPickerDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.gallery.pro.R import com.simplemobiletools.gallery.pro.extensions.config +import com.simplemobiletools.gallery.pro.extensions.getCachedDirectories +import com.simplemobiletools.gallery.pro.extensions.loadJpg import com.simplemobiletools.gallery.pro.extensions.widgetsDB import com.simplemobiletools.gallery.pro.helpers.MyWidgetProvider import com.simplemobiletools.gallery.pro.models.Widget @@ -40,6 +42,15 @@ class WidgetConfigureActivity : SimpleActivity() { config_save.setTextColor(getAdjustedPrimaryColor()) updateTextColors(folder_picker_holder) folder_picker_holder.background = ColorDrawable(config.backgroundColor) + + getCachedDirectories(false, false) { + val path = it.firstOrNull()?.tmb + if (path != null) { + runOnUiThread { + loadJpg(path, config_image, true) + } + } + } } private fun initVariables() { diff --git a/app/src/main/res/layout/widget_config.xml b/app/src/main/res/layout/widget_config.xml index 2c22b4e2c..d8b56d5d1 100644 --- a/app/src/main/res/layout/widget_config.xml +++ b/app/src/main/res/layout/widget_config.xml @@ -35,10 +35,9 @@ android:id="@+id/config_image_holder" android:layout_width="110dp" android:layout_height="110dp" - android:layout_below="@+id/folder_picker_holder" - android:padding="@dimen/activity_margin"> + android:layout_below="@+id/folder_picker_holder"> -