العمل مع الصور
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يمكن أن يساعد استخدام الصور في خلفية شاشة الساعة في إضفاء الحيوية عليها، بدءًا من
صورة خلفية ملء الشاشة إلى صور تفصيلية فردية لإضافة لمسة من الاهتمام.
ضَع موارد الصور في مجلد res/drawable
، على سبيل المثال
res/drawable/face.png
، ثمّ ارجع إلى الصورة على النحو التالي:
<PartImage x="100" y="100" width="250" height="250">
<Image resource="face"/>
</PartImage>
يمكن تعديل عنصر PartImage
، كما هو الحال مع الحاويات الأخرى في تنسيق خلفية شاشة الساعة،
بطرق عديدة، بما في ذلك تغيير حجمه أو تدويره أو تحويله أو تلوينه أو حجبه.
يُرجى الاطّلاع على مرجع PartImage
للحصول على مزيد من المعلومات.
تغيير الخلفية
من التأثيرات التي يمكن أن تجذب الانتباه تغيير الخلفية كل ساعة.
ويمكن تحقيق ذلك من خلال استخدام العنصر Images
، على سبيل المثال:
<PartImage ...>
<Images change="ON_NEXT_HOUR">
<Image resource="background1"/>
<Image resource="background2"/>
...
</Images>
</PartImage>
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Work with images\n\nUsing images in your watch face can really help bring it to life, from a\nfull-screen background image to individual detail images to add interest.\n\nPlace your image resources in the `res/drawable` folder, for example\n`res/drawable/face.png`, and then reference the image as follows: \n\n \u003cPartImage x=\"100\" y=\"100\" width=\"250\" height=\"250\"\u003e\n \u003cImage resource=\"face\"/\u003e\n \u003c/PartImage\u003e\n\nThe `PartImage` element, as with other containers in Watch Face Format,\ncan be modified in\nmany ways, including being scaled, rotated, transformed, tinted, or masked.\nSee the [`PartImage`](/training/wearables/wff/group/part/image/part-image) reference for more information.\n\n### Vary the background\n\nOne effect that can provide interest is to change the background every hour.\nThis can be achieved through the use of the `Images` element, for example: \n\n \u003cPartImage ...\u003e\n \u003cImages change=\"ON_NEXT_HOUR\"\u003e\n \u003cImage resource=\"background1\"/\u003e\n \u003cImage resource=\"background2\"/\u003e\n ...\n \u003c/Images\u003e\n \u003c/PartImage\u003e"]]