Shows single or multiple photos, set using the companion app.
Introduced in Wear OS 6
Syntax
<Photos source="string" defaultImageResource="string" change="TAP | ON_VISIBLE" changeAfterEvery="integer" width="integer" height="integer"> </Photos>
Attributes
The Photos element has the following attributes. Some attributes are
required while others are optional.
Required attributes
The following attributes are required:
- source
- The name of source of the photos. Must correspond to the name used in the - idin the- PhotosConfigurationdefinition.
- For example, if an - idof- my_photosis used in- PhotosConfigurationthen use- [CONFIGURATION.my_photos], as shown in the following snippet:- <UserConfigurations> <PhotosConfiguration id="my_photos" configType="SINGLE"/> </UserConfigurations> <Scene> <PartImage ...> <Photos source="[CONFIGURATION.my_photos]" defaultImageResource="placeholder_photo"/> </PartImage> </Scene>
- defaultImageResource
- The default image to show. Shown if the user has not selected a photo using the companion app. This has a maximum size of 50 KB. 
Optional attributes
The following attributes are optional:
- change
- A space-separated list of events that cause the photo to be changed. This applies only when the - PhotosConfigurationspecifies multiple images can be shown. Can include one or more of the following values:- TAP- when the user taps the photo element.
- ON_VISIBLE- when the photo element becomes visible.
 
- changeAfterEvery
- Applies only to the - ON_VISIBLE- changetype and specifies after how many device wake-ups the photo should change. Must be an value between 3 and 10 inclusive.
- width
- If specified, applies a crop of this width to the photo. 
- height
- If specified, applies a crop of this height to the photo. 
Recommended for you
- Note: link text is displayed when JavaScript is off
- Image
- Complication
