Indication
-
Cmn
interface Indication
IndicationNodeFactory |
IndicationNodeFactory is an Indication that creates |
Indication represents visual effects that occur when certain interactions happens. For example: showing a ripple effect when a component is pressed, or a highlight when a component is focused.
To implement your own Indication, see IndicationNodeFactory
- an optimized Indication
that allows for more efficient implementations than the deprecated rememberUpdatedInstance
.
Indication is typically provided throughout the hierarchy through LocalIndication
- you can provide a custom Indication to LocalIndication
to change the default Indication
used for components such as clickable
.
Summary
Public functions |
||
---|---|---|
open IndicationInstance |
@Composable This function is deprecated. rememberUpdatedInstance has been deprecated - implementers should instead implement IndicationNodeFactory#create for improved performance and efficiency. |
Cmn
|
Public functions
rememberUpdatedInstance
@Composable
open funrememberUpdatedInstance(interactionSource: InteractionSource): IndicationInstance
remember
s a new IndicationInstance
, and updates its state based on Interaction
s emitted via interactionSource
. Typically this will be called by indication
, so one IndicationInstance
will be used for one component that draws Indication
, such as a button.
Implementations of this function should observe Interaction
s using interactionSource
, using them to launch animations / state changes inside IndicationInstance
that will then be reflected inside IndicationInstance.drawIndication
.
Parameters | |
---|---|
interactionSource: InteractionSource |
the |
Returns | |
---|---|
IndicationInstance |
an |