diff --git a/app/build.gradle b/app/build.gradle
index c71c8fbb..d912780c 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -57,7 +57,7 @@ android {
}
dependencies {
- implementation 'com.simplemobiletools:commons:5.26.8'
+ implementation 'com.simplemobiletools:commons:5.26.9'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
kapt 'androidx.room:room-compiler:2.2.5'
diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/WidgetConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/WidgetConfigureActivity.kt
index 079a4296..7ab46391 100644
--- a/app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/WidgetConfigureActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/WidgetConfigureActivity.kt
@@ -78,12 +78,7 @@ class WidgetConfigureActivity : SimpleActivity() {
mTextColor = extras?.getInt(CUSTOMIZED_WIDGET_TEXT_COLOR) ?: config.widgetTextColor
}
- if (mBgColor == 1) {
- mBgColor = Color.BLACK
- mBgAlpha = .2f
- } else {
- mBgAlpha = Color.alpha(mBgColor) / 255f
- }
+ mBgAlpha = Color.alpha(mBgColor) / 255.toFloat()
mBgColorWithoutTransparency = Color.rgb(Color.red(mBgColor), Color.green(mBgColor), Color.blue(mBgColor))
config_bg_seekbar.apply {
diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/pro/helpers/MyWidgetProvider.kt b/app/src/main/kotlin/com/simplemobiletools/notes/pro/helpers/MyWidgetProvider.kt
index bb72530f..7dd5b2d2 100644
--- a/app/src/main/kotlin/com/simplemobiletools/notes/pro/helpers/MyWidgetProvider.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/notes/pro/helpers/MyWidgetProvider.kt
@@ -7,8 +7,8 @@ import android.content.Context
import android.content.Intent
import android.net.Uri
import android.widget.RemoteViews
+import com.simplemobiletools.commons.extensions.applyColorFilter
import com.simplemobiletools.commons.extensions.getLaunchIntent
-import com.simplemobiletools.commons.extensions.setBackgroundColor
import com.simplemobiletools.commons.helpers.WIDGET_TEXT_COLOR
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.notes.pro.R
@@ -31,7 +31,7 @@ class MyWidgetProvider : AppWidgetProvider() {
for (widgetId in appWidgetIds) {
val widget = context.widgetsDB.getWidgetWithWidgetId(widgetId) ?: continue
val views = RemoteViews(context.packageName, R.layout.widget)
- views.setBackgroundColor(R.id.notes_widget_holder, widget.widgetBgColor)
+ views.applyColorFilter(R.id.notes_widget_background, widget.widgetBgColor)
setupAppOpenIntent(context, views, R.id.notes_widget_holder, widget)
Intent(context, WidgetService::class.java).apply {
@@ -60,4 +60,4 @@ class MyWidgetProvider : AppWidgetProvider() {
}
}
}
-}
\ No newline at end of file
+}
diff --git a/app/src/main/res/layout/widget.xml b/app/src/main/res/layout/widget.xml
index ea3e025f..7b56613b 100644
--- a/app/src/main/res/layout/widget.xml
+++ b/app/src/main/res/layout/widget.xml
@@ -1,14 +1,23 @@
-
+
+
+ android:divider="@null" />
diff --git a/app/src/main/res/layout/widget_text_layout.xml b/app/src/main/res/layout/widget_text_layout.xml
index bf4d8d33..5605970d 100644
--- a/app/src/main/res/layout/widget_text_layout.xml
+++ b/app/src/main/res/layout/widget_text_layout.xml
@@ -1,6 +1,5 @@
-
@@ -12,7 +11,7 @@
android:background="@null"
android:gravity="left"
android:padding="@dimen/small_margin"
- android:visibility="gone"/>
+ android:visibility="gone" />
+ android:visibility="gone" />
+ android:visibility="gone" />