Compare commits

..

No commits in common. "15d36eeff45cfe4cd161d46a26b9db7852d1792c" and "23c59735016384d5bb98c6c6dc70d32901a87824" have entirely different histories.

4 changed files with 9 additions and 12 deletions

View file

@ -2,6 +2,7 @@ package de.jrpie.android.launcher.preferences
import android.content.Context
import android.util.Log
import de.jrpie.android.launcher.Application
import de.jrpie.android.launcher.BuildConfig
import de.jrpie.android.launcher.actions.Action
import de.jrpie.android.launcher.apps.AbstractAppInfo
@ -20,8 +21,8 @@ import de.jrpie.android.launcher.widgets.ClockWidget
import de.jrpie.android.launcher.widgets.DebugInfoWidget
import de.jrpie.android.launcher.widgets.WidgetPanel
import de.jrpie.android.launcher.widgets.WidgetPosition
import de.jrpie.android.launcher.widgets.deleteAllWidgets
import de.jrpie.android.launcher.widgets.generateInternalId
import de.jrpie.android.launcher.widgets.getAppWidgetHost
/* Current version of the structure of preferences.
* Increase when breaking changes are introduced and write an appropriate case in
@ -91,7 +92,7 @@ fun resetPreferences(context: Context) {
Log.i(TAG, "Resetting preferences")
LauncherPreferences.clear()
LauncherPreferences.internal().versionCode(PREFERENCE_VERSION)
context.getAppWidgetHost().deleteHost()
deleteAllWidgets(context)
LauncherPreferences.widgets().widgets(
setOf(

View file

@ -15,6 +15,11 @@ import de.jrpie.android.launcher.Application
import de.jrpie.android.launcher.preferences.LauncherPreferences
import kotlin.math.min
fun deleteAllWidgets(context: Context) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
context.getAppWidgetHost().appWidgetIds.forEach { AppWidget(it).delete(context) }
}
}
/**
* Tries to bind [providerInfo] to the id [id].

View file

@ -6,6 +6,7 @@
android:id="@+id/list_apps_row_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15sp"
android:layout_marginHorizontal="30sp">
<androidx.cardview.widget.CardView
@ -14,7 +15,6 @@
app:cardBackgroundColor="?cardBackgroundColor"
app:cardElevation="8dp"
app:cardCornerRadius="12dp"
app:cardUseCompatPadding="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View file

@ -30,15 +30,6 @@ Set the font used within the app settings. This setting does not affect the date
### Background (app list and setting)
Defines which background should be used in app drawers, settings, etc.
to increase legibility.
* `Transparent` does not change the wallpaper.
* `Dim` dims the wallpaper.
* `Blur` tries to blur the wallpaper. This is not possible on all devices. Some older devices don't support the operation. Also blur can be temporarily unavailable when the device is in power saving mode. In these case, `Dim` is used as a fallback.
* `Solid` sets the background to a solid color (depending on the color theme). For the light theme only this option is available.
On the home screen and on widget panels the wallpaper is always shown unmodified.
**type:**&nbsp;`dropdown`
**type:**&nbsp;`Transparent`,`Dim`,`Blur`,`Solid`