File tree Expand file tree Collapse file tree
java/to/bitkit/appwidget/ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,14 +4,14 @@ import android.content.Intent
44import androidx.compose.runtime.Composable
55import androidx.compose.ui.unit.dp
66import androidx.glance.GlanceModifier
7+ import androidx.glance.ImageProvider
78import androidx.glance.action.clickable
89import androidx.glance.appwidget.action.actionStartActivity
9- import androidx.glance.appwidget.cornerRadius
1010import androidx.glance.background
1111import androidx.glance.layout.Column
1212import androidx.glance.layout.fillMaxSize
1313import androidx.glance.layout.padding
14- import to.bitkit.appwidget.ui.theme.GlanceColors
14+ import to.bitkit.R
1515
1616@Composable
1717fun GlanceWidgetScaffold (
@@ -20,8 +20,7 @@ fun GlanceWidgetScaffold(
2020) {
2121 val modifier = GlanceModifier
2222 .fillMaxSize()
23- .cornerRadius(16 .dp)
24- .background(GlanceColors .cardBackgroundProvider)
23+ .background(ImageProvider (R .drawable.appwidget_background))
2524 .padding(16 .dp)
2625 .let { mod ->
2726 if (onClick != null ) mod.clickable(actionStartActivity(onClick)) else mod
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import androidx.glance.color.ColorProvider
44import to.bitkit.ui.theme.Colors
55
66object GlanceColors {
7- val cardBackgroundProvider = ColorProvider (day = Colors .Gray5 , night = Colors .Gray5 )
87 val textPrimary = ColorProvider (day = Colors .White , night = Colors .White )
98 val textSecondary = ColorProvider (day = Colors .White64 , night = Colors .White64 )
109 val textTertiary = ColorProvider (day = Colors .White50 , night = Colors .White50 )
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <shape xmlns : android =" http://schemas.android.com/apk/res/android"
3+ android : shape =" rectangle" >
4+ <corners android : radius =" 16dp" />
5+ <solid android : color =" @color/gray5" />
6+ </shape >
You can’t perform that action at this time.
0 commit comments