resolveToolkitIcon
Picks which of the two icons of a component has to be rendered.
The rules cover the three combinations the toolkit supports:
Static only (vector, drawable resource, and/or bitmap): selectedIcon while selected, icon otherwise.
Static normal icon + animated selected icon: the static icon is shown until the component is either selected or clicked at least once (interacted); from then on the AVD is rendered so it can play. This is the "
Icons.Rounded.Shareat rest, animation on click" case. The first frame of the AVD should be drawn like the static icon, otherwise the swap is visible.Animated only: the AVD is always rendered, resting on its first or last frame depending on the selection state.
Parameters
Icon declared for the unselected state.
Icon declared for the selected state.
Whether the component is currently selected.
Whether the component has been clicked at least once while composed.