Animasyonlu resimler oluşturma
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Kadrandaki statik resimlere ek olarak animasyonlu resimler de kullanıcı deneyimine başka bir boyut kazandırabilir.
Bu bölümün özellikle animasyonlu resim dosyalarının kullanımıyla ilgili olduğunu unutmayın. Transform
öğesini kullanarak kadrandaki bileşenleri canlandırabilirsiniz. Bu öğe hakkında bilgi edinmek için Öğelerin görünümünü dinamik olarak değiştirme sayfasına göz atın.
Animasyonlar, animasyonlu GIF gibi animasyonlu resim dosyalarından veya animasyon oluşturmak için bir araya getirilen Images
'lerden oluşabilir.
Kullanılacak dosyaları belirtmenin yanı sıra, animasyonun nasıl davranacağını (ör. oynatmanın döngüde oynatılıp oynatılmayacağını veya oynatılmıyorsa sonunda ne yapılacağını) ve diğer seçenekleri de tanımlamanız gerekir. Bunun için bir AnimationController
kullanın.
Son olarak, tüm animasyonlara bir küçük resim ekleyin.
Bu bilgileri bir araya getirerek temel bir animasyon aşağıdaki gibi uygulanabilir:
<PartAnimatedImage x="0" y="0" width="450" height="450">
<AnimationController play="ON_VISIBLE"/>
<AnimatedImage resource="my_animation" format="AGIF"/>
<Thumbnail resource="my_animation_thumbnail" />
</PartAnimatedImage>
Animasyonlu resim listesi ekleme ve hareketsiz resimlerden animasyon oluşturma hakkında daha fazla bilgi için PartAnimatedImage
referansını inceleyin.
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-27 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-27 UTC."],[],[],null,["# Create animated images\n\nIn addition to static images on the watch face, animated images can bring a\nfurther dimension to the user experience.\n\nNote that this section is specifically about using animated image files. It is\npossible to animate components on the watch face using the `Transform` element,\nwhich is covered on the [Dynamically changing the appearance of\nelements](/training/wearables/wff/transform) page.\n\nAnimations can consist of either an animated image file, such as an animated\nGIF, or a sequence of `Images`, which combine together to form an animation.\n\nAs well as specifying the files to use, you'll need to define how the animation\nshould behave, for example, whether to loop the playback, or if not, what to do\nat the end, among other options. For this, use an [`AnimationController`](/training/wearables/wff/group/part/animated-image/animation-controller).\n\nFinally, for all animations, include a [thumbnail\nimage](/training/wearables/wff/group/part/animated-image/thumbnail) in all animations.\n\nPutting this together, a basic animation can be implemented as follows: \n\n \u003cPartAnimatedImage x=\"0\" y=\"0\" width=\"450\" height=\"450\"\u003e\n \u003cAnimationController play=\"ON_VISIBLE\"/\u003e\n \u003cAnimatedImage resource=\"my_animation\" format=\"AGIF\"/\u003e\n \u003cThumbnail resource=\"my_animation_thumbnail\" /\u003e\n \u003c/PartAnimatedImage\u003e\n\nConsult the [`PartAnimatedImage`](/training/wearables/wff/group/part/animated-image/part-animated-image) reference for more details on including a\nlist of animated images and constructing an animation from still images."]]