Skip to content

Commit 578ec93

Browse files
authored
Add reconfiguration and description to widgets for Android 12 (#1825)
1 parent 406da5c commit 578ec93

6 files changed

+14
-0
lines changed

app/src/main/res/values/strings.xml

+5
Original file line numberDiff line numberDiff line change
@@ -633,4 +633,9 @@ like to connect to:</string>
633633
<string name="wear_os_category">Wear OS</string>
634634
<string name="wear_os_settings_title">Wear OS Settings</string>
635635
<string name="wear_os_settings_summary">Manage Wear OS App</string>
636+
<string name="camera_widget_desc">Displays the latest image from the camera</string>
637+
<string name="button_widget_desc">Call any service</string>
638+
<string name="entity_widget_desc">Current state and attribute of any entity</string>
639+
<string name="media_player_widget_desc">Control any media player and see current now playing image</string>
640+
<string name="template_widget_desc">Render any template with HTML formatting</string>
636641
</resources>

app/src/main/res/xml/button_widget_info.xml

+2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@
99
android:minResizeHeight="40dp"
1010
android:resizeMode="vertical|horizontal"
1111
android:updatePeriodMillis="86400000"
12+
android:widgetFeatures="reconfigurable"
13+
android:description="@string/button_widget_desc"
1214
android:widgetCategory="home_screen"
1315
android:previewImage="@drawable/widget_example_button" />

app/src/main/res/xml/camera_widget_info.xml

+1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
android:resizeMode="vertical|horizontal"
99
android:updatePeriodMillis="3600000"
1010
android:widgetCategory="home_screen"
11+
android:description="@string/camera_widget_desc"
1112
android:previewImage="@drawable/widget_example_camera" />

app/src/main/res/xml/entity_widget_info.xml

+2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@
99
android:minResizeHeight="40dp"
1010
android:resizeMode="vertical|horizontal"
1111
android:updatePeriodMillis="1800000"
12+
android:widgetFeatures="reconfigurable"
13+
android:description="@string/entity_widget_desc"
1214
android:widgetCategory="home_screen"
1315
android:previewImage="@drawable/widget_example_entity" />

app/src/main/res/xml/media_player_control_widget_info.xml

+2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
android:minWidth="250dp"
77
android:minHeight="40dp"
88
android:updatePeriodMillis="86400000"
9+
android:widgetFeatures="reconfigurable"
10+
android:description="@string/media_player_widget_desc"
911
android:widgetCategory="home_screen"
1012
android:previewImage="@drawable/widget_example_media_player_controls" />

app/src/main/res/xml/template_widget_info.xml

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
android:minResizeWidth="40dp"
99
android:minResizeHeight="40dp"
1010
android:resizeMode="vertical|horizontal"
11+
android:widgetFeatures="reconfigurable"
12+
android:description="@string/template_widget_desc"
1113
android:updatePeriodMillis="1800000"
1214
android:widgetCategory="home_screen"
1315
android:previewImage="@drawable/widget_example_template" />

0 commit comments

Comments
 (0)