-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change to string resource and blank widget
- Loading branch information
Showing
8 changed files
with
100 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
app/src/main/java/com/maary/yetanothercalendarwidget/blankwidget/BlankWidget.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.maary.yetanothercalendarwidget.blankwidget | ||
|
||
import android.content.Context | ||
import androidx.compose.runtime.Composable | ||
import androidx.glance.GlanceId | ||
import androidx.glance.GlanceTheme | ||
import androidx.glance.appwidget.GlanceAppWidget | ||
import androidx.glance.appwidget.provideContent | ||
|
||
class BlankWidget: GlanceAppWidget() { | ||
override suspend fun provideGlance(context: Context, id: GlanceId) { | ||
provideContent { | ||
GlanceTheme { | ||
Content() | ||
} | ||
} | ||
} | ||
} | ||
|
||
@Composable | ||
private fun Content() { | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
app/src/main/java/com/maary/yetanothercalendarwidget/blankwidget/BlankWidgetProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.maary.yetanothercalendarwidget.blankwidget | ||
|
||
import androidx.glance.appwidget.GlanceAppWidget | ||
import androidx.glance.appwidget.GlanceAppWidgetReceiver | ||
|
||
class BlankWidgetProvider : GlanceAppWidgetReceiver() { | ||
override val glanceAppWidget: GlanceAppWidget | ||
get() = BlankWidget() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...etanothercalendarwidget/WidgetReceiver.kt → ...arwidget/calenderwidget/WidgetReceiver.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="app_name">Yet Another Calendar Widget</string> | ||
<string name="calendar_widget">日历微件</string> | ||
<string name="blank_widget">空微件</string> | ||
<string name="sunday">周日</string> | ||
<string name="monday">周一</string> | ||
<string name="tuesday">周二</string> | ||
<string name="wednesday">周三</string> | ||
<string name="thursday">周四</string> | ||
<string name="friday">周五</string> | ||
<string name="saturday">周六</string> | ||
<string name="yesterday">昨天</string> | ||
<string name="today">今天</string> | ||
<string name="tomorrow">明天</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
<resources> | ||
<string name="app_name">Yet Another Calendar Widget</string> | ||
<string name="calendar_widget">Calendar Widget</string> | ||
<string name="blank_widget">Blank Widget</string> | ||
<string name="sunday">Sunday</string> | ||
<string name="monday">Monday</string> | ||
<string name="tuesday">Tuesday</string> | ||
<string name="wednesday">Wednesday</string> | ||
<string name="thursday">Thursday</string> | ||
<string name="friday">Friday</string> | ||
<string name="saturday">Saturday</string> | ||
<string name="yesterday">Yesterday</string> | ||
<string name="today">Today</string> | ||
<string name="tomorrow">Tomorrow</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:initialLayout="@layout/glance_default_loading_layout" | ||
android:minWidth="40dp" | ||
android:minHeight="40dp" | ||
android:targetCellWidth="1" | ||
android:targetCellHeight="1" | ||
android:updatePeriodMillis="0" | ||
android:resizeMode="none" | ||
android:widgetCategory="home_screen"> | ||
</appwidget-provider> |