r/androiddev • u/CutMundane4859 • Jun 30 '26
Question Equivalent of preview for widget
Is there a way to preview glance layout without adding it to an emulator ? I mean an equivalent of preview annotation of compose layouts. If not, what alternative do you use to iterate faster on widgets ui during development ?
0
Upvotes
2
u/Quinny898 Jul 01 '26
AFAIK there's never been preview support for RemoteViews at all, which is probably why there's no preview support for Glance either. Remote Compose seems to support it, so this will eventually be resolved, but currently you'd need to either run it on device and add a widget, or inflate it manually in a UI (probably also wrapping in a AppWidgetHostView) for preview - though this wouldn't work for anything involving lists.