Fixed
Status Update
Comments
za...@google.com <za...@google.com>
wv...@google.com <wv...@google.com>
wv...@google.com <wv...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit d04e7a60660bf4a268558a9a4d843acde2ac724c
Author: Willie Koomson <wvk@google.com>
Date: Mon May 15 17:10:00 2023
Add key parameters for all functions that accept lambdas
Adds key parameters for GlanceModifier.clickable, as well as Button,
CheckBox, Switch, and RadioButton. This way, users do not have to use
the action factory function directly.
Bug: 282445798
Relnote: "Added an optional key parameter for all elements that accept
lambdas."
Test: :glance:glance-appwidget:{build,cDAT}
Change-Id: Id96c1c5754d4f39551a72cc2698451e341308bc8
M glance/glance-appwidget/api/1.0.0-beta02.txt
M glance/glance-appwidget/api/current.txt
M glance/glance-appwidget/api/restricted_1.0.0-beta02.txt
M glance/glance-appwidget/api/restricted_current.txt
M glance/glance-appwidget/src/main/java/androidx/glance/appwidget/CheckBox.kt
M glance/glance-appwidget/src/main/java/androidx/glance/appwidget/RadioButton.kt
M glance/glance-appwidget/src/main/java/androidx/glance/appwidget/Switch.kt
M glance/glance/api/1.0.0-beta02.txt
M glance/glance/api/current.txt
M glance/glance/api/restricted_1.0.0-beta02.txt
M glance/glance/api/restricted_current.txt
M glance/glance/src/main/java/androidx/glance/Button.kt
M glance/glance/src/main/java/androidx/glance/action/Action.kt
https://android-review.googlesource.com/2603167
Branch: androidx-main
commit d04e7a60660bf4a268558a9a4d843acde2ac724c
Author: Willie Koomson <wvk@google.com>
Date: Mon May 15 17:10:00 2023
Add key parameters for all functions that accept lambdas
Adds key parameters for GlanceModifier.clickable, as well as Button,
CheckBox, Switch, and RadioButton. This way, users do not have to use
the action factory function directly.
Bug: 282445798
Relnote: "Added an optional key parameter for all elements that accept
lambdas."
Test: :glance:glance-appwidget:{build,cDAT}
Change-Id: Id96c1c5754d4f39551a72cc2698451e341308bc8
M glance/glance-appwidget/api/1.0.0-beta02.txt
M glance/glance-appwidget/api/current.txt
M glance/glance-appwidget/api/restricted_1.0.0-beta02.txt
M glance/glance-appwidget/api/restricted_current.txt
M glance/glance-appwidget/src/main/java/androidx/glance/appwidget/CheckBox.kt
M glance/glance-appwidget/src/main/java/androidx/glance/appwidget/RadioButton.kt
M glance/glance-appwidget/src/main/java/androidx/glance/appwidget/Switch.kt
M glance/glance/api/1.0.0-beta02.txt
M glance/glance/api/current.txt
M glance/glance/api/restricted_1.0.0-beta02.txt
M glance/glance/api/restricted_current.txt
M glance/glance/src/main/java/androidx/glance/Button.kt
M glance/glance/src/main/java/androidx/glance/action/Action.kt
na...@google.com <na...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.glance:glance:1.0.0-rc01
androidx.glance:glance-appwidget:1.0.0-rc01
Description
Component used: Glance-widget Version used: beta01 Devices/Android versions reproduced on: various devices
One of the two overloads of
GlanceModifier.clickable
accepts a lambda() -> Unit
which uses it to create an Action asaction(block)
.action
accepts an optionalkey
value;clickable
should accept an optionalkey
as well, as a parameter, to pass toaction
.This is important because using
GlanceModifier.clickable
without an explicitkey
, could lead to unexpected behaviors.Example: Observing a
Flow
emittinga, b, c
, where every item is used in the same order to create a clickable item, the actions will be incorrect, when theFlow
then emitsc, a, b
, unless we create an action with an explicitkey
to identify the item