사진으로 맞춤설정하기
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
참고: 이 기능은 시계 화면 형식 버전 4 이상에서 사용할 수 있습니다.
사용자가 시계 화면에 포함할 사진을 선택할 수 있도록 허용하면 시계 화면 환경에 개성을 더할 수 있습니다.
이미지 작업 섹션에서 시계 화면에 이미지를 표시하는 방법을 이미 다뤘습니다. 사용자가 사전 정의된 다양한 이미지 중에서 선택할 수 있도록 하려면 사용자 구성 정의 섹션에 표시된 대로 ListConfiguration
를 사용하세요.
사용자가 구성할 수 있는 이미지를 시계 화면에서 사용하려면 <PhotosConfiguration>
요소를 사용하세요. 예를 들면 다음과 같습니다.
<UserConfigurations>
<PhotosConfiguration id="photoConfig" configType="SINGLE"/>
</UserConfigurations>
configType
는 SINGLE
또는 MULTIPLE
일 수 있으며, 이는 사용자가 컴패니언 내에서 단일 이미지를 선택할 수 있는지 또는 사진 모음을 선택할 수 있는지 여부를 나타냅니다.
단일 사진 지원
단일 이미지의 경우 사진은 다음과 같이 PartImage
요소 내에서 사용할 수 있습니다.
<PartImage ...>
<Photos source="[CONFIGURATION.photoConfig]" defaultImageResource="default_image"/>
</PartImage>
사용자가 컴패니언에서 사진을 선택하지 않은 경우 표시되고 필수 속성인 defaultImageResource
를 확인하세요.
사용자가 다른 사진을 선택하려면 호환 기기를 사용하여 기존 선택 항목을 다른 항목으로 대체해야 합니다.
여러 사진 지원
configType="MULTIPLE"
와 함께 PhotosConfiguration
를 사용하면 시계 화면에 컬렉션의 사진을 표시할 수 있으며, 이 사진은 탭하거나 여러 번 조회한 후 자동으로 전환할 수 있습니다.
<Photos change="ON_VISIBLE TAP" changeAfterEvery="5"
source="[CONFIGURATION.photoConfig]" defaultImageResource="default_image"/>
위 예는 MULTIPLE
를 사용할 때 도입되는 두 가지 옵션을 보여줍니다.
change
속성을 사용하면 개발자가 사진이 사용 가능한 이미지를 순환하도록 하는 이벤트를 지정할 수 있습니다.
위 예에서는 TAP
와 ON_VISIBLE
가 모두 지정되어 있으므로 사용자가 사진을 탭하거나 사진이 표시되는 것에 응답하여 사진이 변경됩니다.
changeAfterEvery
속성은 ON_VISIBLE
변경 이벤트에만 적용되며, 사진이 변경되기 전에 사진이 표시되어야 하는 횟수를 지정합니다. 예를 들어 사용자가 시계를 깨울 때마다 사진을 변경하는 것이 너무 잦다고 생각할 수 있습니다. 여기서 기본값은 3입니다.
PhotosConfiguration
사용에 관한 자세한 내용은 GitHub의 샘플을 참고하세요.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Personalize with photos\n\n**Note**: This feature is available on version 4 and higher of Watch Face\nFormat.\n\nAllowing the user to select photos for inclusion on the watch face can help\nbring a personal touch to your watch face experience.\n\nThe [working with images](/training/wearables/wff/images) section already covers how to display images in\nyour watch face. If you want to allow the user to choose from a range of\npredefined images, then use a `ListConfiguration` as shown in the [define user\nconfigurations](/training/wearables/wff/personalization/user-configurations) section.\n\nTo use images in your watch face that the user can configure, use the\n`\u003cPhotosConfiguration\u003e` element, for example: \n\n \u003cUserConfigurations\u003e\n \u003cPhotosConfiguration id=\"photoConfig\" configType=\"SINGLE\"/\u003e\n \u003c/UserConfigurations\u003e\n\nThe `configType` can be either `SINGLE` or `MULTIPLE` indicating whether the\nuser will be able to select a single image within the companion or a collection\nof photos.\n\nSupport a single photo\n----------------------\n\nFor the single image case, the photo can be used within a `PartImage` element as\nfollows: \n\n \u003cPartImage ...\u003e\n \u003cPhotos source=\"[CONFIGURATION.photoConfig]\" defaultImageResource=\"default_image\"/\u003e\n \u003c/PartImage\u003e\n\nNote the `defaultImageResource`, which is shown when the user has not\nselected a photo in the companion and is a required attribute.\n\nIf the user wishes to select a different photo, then they must use the companion\nto replace the existing selection with another.\n\nSupport multiple photos\n-----------------------\n\nUsing `PhotosConfiguration` with `configType=\"MULTIPLE\"` allows the watch face\nto display a photo from a collection, which can be cycled through either through\ntapping or automatically after so many views have taken place. \n\n \u003cPhotos change=\"ON_VISIBLE TAP\" changeAfterEvery=\"5\"\n source=\"[CONFIGURATION.photoConfig]\" defaultImageResource=\"default_image\"/\u003e\n\nThe preceding example shows the two options that are introduced when using\n`MULTIPLE`:\n\n1. The `change` attribute allows the developer to specify what events should cause the photo to cycle through the available images.\n\nIn the preceding example, both `TAP` and `ON_VISIBLE` are specified, meaning\nthat the photo changes in response *either* to a user tapping the photo *or*\nin response to the photo becoming visible.\n\n1. The `changeAfterEvery` attribute applies only to the `ON_VISIBLE` change event, specifing how many times the photo should have become visible before the photo is changed. For example, you may feel that changing the photo every time the user wakes their watch is too frequent. The default value here is 3.\n\nFor more details on working with `PhotosConfiguration`, see the samples on\nGitHub."]]