Exploring and Building Android App Widgets With Glance APIs | by Ngenge Senior | Feb, 2022

Create intuitive Android widgets

Photograph by Sebastian Bednarek on Unsplash
implementation "androidx.look:glance-appwidget:1.0.0-alpha02"
Android emulator with app Widget.
<?xml model="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minHeight="180dp"
android:minWidth="180dp"
android:description="@string/app_widget_description"
android:previewLayout="@drawable/example_appwidget_preview"
android:minResizeHeight="90dp"
android:minResizeWidth="90dp"
android:targetCellHeight="2"
android:targetCellWidth="2"
android:resizeMode="horizontal|vertical"
android:updatePeriodMillis="86400000"
android:widgetCategory="home_screen"
/>

Creating the Look Widget

More Posts