mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-06-05 22:19:17 +02:00
add optional text shadow to widget for better readability
This commit is contained in:
@ -22,7 +22,8 @@ class MyWidgetDateTimeProvider : AppWidgetProvider() {
|
||||
private fun performUpdate(context: Context) {
|
||||
val appWidgetManager = AppWidgetManager.getInstance(context)
|
||||
appWidgetManager.getAppWidgetIds(getComponentName(context)).forEach {
|
||||
RemoteViews(context.packageName, R.layout.widget_date_time).apply {
|
||||
val layout = if (context.config.useTextShadow) R.layout.widget_date_time_with_shadow else R.layout.widget_date_time
|
||||
RemoteViews(context.packageName, layout).apply {
|
||||
updateTexts(context, this)
|
||||
updateColors(context, this)
|
||||
appWidgetManager.updateAppWidget(it, this)
|
||||
|
Reference in New Issue
Block a user