Questions tagged [glance-appwidget]

Use this tag to ask questions for Jetpack Glance for AppWidget

API reference for Jetpack Glance for AppWidget: https://developer.android.com/reference/kotlin/androidx/glance/appwidget/package-summary

Code samples and guidance: https://github.com/android/user-interface-samples/tree/glance/AppWidget/glance-widget

59 questions
0
votes
0 answers

Android Glance Widget - Any way to tint a Shape drawable with borderRadius?

Using Glance-beta01 CornerRadius modifier cannot be used on Android 12-, we have to use a drawable with a shape like :
Jscti
  • 14,096
  • 4
  • 62
  • 87
0
votes
0 answers

Android Widget : Dynamic colors not updating

When switching Color Palette from the Android Theme page, I think there is a system bug : all the 4 first colors are applied without errors but all the colors of the next pages fallback to the colors of the first page totally ignoring what I…
Jscti
  • 14,096
  • 4
  • 62
  • 87
0
votes
1 answer

What string to provide to androidx.glance.text.FontFamily for custom font?

What string do we pass into androidx.glance.text.FontFamily to specify a custom font? For example, if I imported @font/open_sans_regular, is the family supposed to be "open_sans_regular"? /** * Describes the family of the font. * Defaults are…
VIN
  • 6,385
  • 7
  • 38
  • 77
0
votes
1 answer

Android Glance appWidget: how to update content when user places it on screen?

In my case there is no button "Refresh" data in my widget UI. From what event can widget be updated when user just place it on screen? I tried to use method onEnabled of GlanceAppWidgetReceiver, but it is not fired. I need some event where I can run…
Foenix
  • 376
  • 4
  • 18
0
votes
1 answer

Android Glance widget: how to retrieve configuration when "reconfiguring" widget?

Using Jetpack Compose "Glance" package (in alpha-0.0.5, beta-01 bugged for me) : is it possible to retrieve the "Configuration data" added at the "widget creation" when displaying the "widget update/reconfigure" screen using the…
Jscti
  • 14,096
  • 4
  • 62
  • 87
0
votes
1 answer

How to use plural string resource with glance appWidget?

How to apply my plural string resources in widget? There is no such extension in context.
Foenix
  • 376
  • 4
  • 18
0
votes
0 answers

Display list of scrollable images inside Android Widget using Jetpack Glance

I am looking for suggestions on how to display list of scrollable images(using image URLs) inside android widget using jetpack glance. I am currently using LazyColumn to display list items inside the widget. Currently the alpha version link contains…
0
votes
0 answers

How to import repositories from cs.android.com?

The Android Code Search site contains a glance directory where it provides a testing framework for Glance Widgets. How can I import this as a project into Android Studio so that the appropriate dependencies are downloaded and the resulting code…
mars8
  • 770
  • 1
  • 11
  • 25
0
votes
1 answer

How to apply Android Code Search examples that use different source sets in Android Studio Project?

I am looking at the source code for Glance Widgets on Android Code Search. I would like to replicate the code used for CheckBoxTest.kt but running into an issue. The problem is the code uses a version of GlanceAppWidget.kt which differs from…
mars8
  • 770
  • 1
  • 11
  • 25
0
votes
0 answers

Kotlin Compose glance App widget LazyColumn

I'm creating app widget and I want to achieve that only part of the widget is scrollable. When I created Box( modifier = GlanceModifier .fillMaxSize() …
0
votes
1 answer

Jetpack Compse Glance Widget API 33 is not resizable on API 30 works

I'm creating app widget with glance. And on my personal phone API 30 resizable works on emulator API 33 or 32 resizable doesn't work. Is that emulator issue? But Google Chrome widget resizable works. xml/widget_info.xml
0
votes
0 answers

Difficulties with dynamic resize of widget and configuring two instances of widget

I am trying to build dynamic resizing of a widget of a Calendar (to show 1 month or 2 months depending on available space). I have added these preview layouts in AppWidgetProvider. private fun updatePreviewLayout( appWidgetIds:…
andude
  • 500
  • 1
  • 5
  • 11
0
votes
1 answer

Unable to use TextClock in GlanceAppWidget as remote View

Based on the official documentation, I can see TextClock seems to be supported now in new GlanceAPI as a Remote view, but I can not used in our example code, class RemoteWidget : GlanceAppWidget(errorUiLayout = R.layout.widget_error_layout)…
0
votes
1 answer

Widget for weather app how to get LocationTracker

I would like to make simple widget for my weather app, to show local temperature. My question is: how to get the LocationTracker in my widget class? class Widget: GlanceAppWidget() {...}
0
votes
0 answers

Jetpack Glance Widget: update called on app exit

I implemented a Glance Widget using Glance 1.0.0-alpha05 GlanceAppWidgetHost 0.2.2 Using the following provider spec. Notice the updatePeriodMillis = 0
Nino van Hooff
  • 3,677
  • 1
  • 36
  • 52