I have the widget that fetch and display the list of data via LazyColumn. After the data loaded, I want the LazyColumn to scroll to specific item.
In Jetpack Compose we have LazyListState but do we have something similar in Glance? (or any…
Is there any way how to make image corners in Jetpack Glance Widget rounded?
I know there is a GlanceModifier method cornerRadius, but this is available only in higher versions (S+).
I am following the sample code from ImageGlanceWidget to load a bitmap to Glance via Uri.
As mentioned in the comments from this answer I have replaced getImageProvider() method with below code. However, when I do this I get error:
Error in Glance…
Goal
How can I pass myObject and myClass parameters to GlanceWorker below?
Background
I am using android-workmanager to run background tasks. These tasks are initialized from a home screen widget which I have added with Glance. As recommended by…
I am using context() in my GlanceAppWidget() for tasks like retrieving glanceId and updating app widget state. I am having issue with how I inject the context object.
I would like to use the dagger/hilt framework to inject the context into my…
In Compose we have the method Canvas() to draw lines etc.
Is there a similar feature in Glance? If not, what would be the best way to replicate the Canvas functionality?
I have a widget made with a android glance library. There is a Row contains Image and Text. I need to make this row clickable.
Row(
verticalAlignment = Alignment.CenterVertically,
modifier =…
I am new to using Uri's to locate files on the emulators storage in android studio.
I have a png file saved in the android emulators data/data/com.domain.appname/files directory. I would like to create the uri for this file using android's…
I did this in Glance to get a bitmap of the online URI for display, but it failed.
Does Glance still support weight ratios?
val context = LocalContext.current val imageLoader = ImageLoader(context)
var bitmap =…
I am trying to create a widget which shows information about a hardware device.
There can be multiple of these devices and user will be able to add same widget for different devices.
I am looking for a way to understand which device information…
My latest idea was to use
updateAppWidgetState(context = context, definition = PreferencesGlanceStateDefinition, glanceId = glanceId) {
// ...
}
and
GlanceWidget().update(context = context, glanceId = glanceId)
but I don't have access to…
One of the first things I like to do with any hello world app/UI is to have some sort of popup or toast.
It seems like listeners in Glance are fairly limited to a set of action types. How can display something simple like a toast onClick?
Is the…
While trying to use the WeatherApp Sample, I am not understanding how I would change it so that each widget did infact use it's own datastore, rather than a shared one.
My understanding is that datastore as it is in the sample below, are saved to…
I have a widget that can render either one month or two months widget (based on size availability).
On API 33, it allows me to resize, but on API 32, it does not render 1 month widget.
API 32 (does not work):
API 33 (works):
class…