<कीफ़्रेमसेट>
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
मोशन के दौरान व्यू के लिए जगह और एट्रिब्यूट की जानकारी देता है
क्रम. डिफ़ॉल्ट रूप से, हलचल शुरुआती स्थिति से आखिरी स्थिति में होती है.
<KeyFrameSet>
का इस्तेमाल करके, आप ज़्यादा मुश्किल मोशन बना सकते हैं.
<KeyFrameSet>
में यह शामिल है
<KeyPosition>
या
<KeyAttribute>
नोड. ये नोड टारगेट व्यू की स्थिति या एट्रिब्यूट को
किसी खास पॉइंट से कनेक्ट करें.
MotionLayout
शुरुआती पॉइंट से व्यू को बिना किसी रुकावट के हर इंटरमीडिएट पॉइंट पर ऐनिमेट करता है
फिर आख़िरी जगह पर जाएँ.
मान लीजिए कि गति अनुक्रम की शुरुआती स्थिति में एक अपार बॉल है
व्यू के निचले बाएं कोने से और आखिरी स्थिति में बॉल को
ऊपर दाईं ओर. डिफ़ॉल्ट रूप से, MotionLayout
बॉल को आसानी से मूव करता है
एक डायगनल लाइन में, धीरे-धीरे पारदर्शी हो जाती है, जो गायब हो जाने के बाद गायब हो जाती है
अपनी मंज़िल पर पहुंचता है. <KeyFrameSet>
का इस्तेमाल करके, इस सेटिंग को बदला जा सकता है.
उदाहरण के लिए, बॉल को ऊपर बाएं कोने में वर्टिकल तौर पर ले जाया जा सकता है
जबकि यह पूरी तरह से अपारदर्शी रहे, फिर ऊपर दाईं ओर क्षैतिज रूप से ले जाएं
गायब हो जाते हैं. ऐसा करने के लिए, <KeyFrameSet>
और
इसके अंदर एक <KeyPosition>
और <KeyAttribute>
जोड़ रहा है. <KeyPosition>
बॉल की इंटरमीडिएट लोकेशन, और <KeyAttribute>
की जानकारी देता है
यह बताता है कि गति के मध्य बिंदु पर बॉल अपारदर्शी बनी रहती है.
वाक्य-विन्यास
<KeyFrameSet>
[ <KeyPosition/>... ]
[ <KeyAttribute/>...]
</KeyFrameSet>
इसमें शामिल
<Transition>
इसमें शामिल है
<KeyPosition>
- मोशन क्रम के दौरान किसी खास पल पर व्यू की स्थिति तय करता है.
<KeyAttribute>
- मोशन क्रम के दौरान किसी खास पल पर व्यू एट्रिब्यूट तय करता है.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, 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,["# <KeyFrameSet>\n\nSpecifies location and attributes for views over the course of the motion\nsequence. By default, motion proceeds from the initial state to the end state.\nBy using `\u003cKeyFrameSet\u003e`, you can build more complex motions.\n\nThe `\u003cKeyFrameSet\u003e` contains\n[`\u003cKeyPosition\u003e`](/training/constraint-layout/motionlayout/ref/keyposition) or\n[`\u003cKeyAttribute\u003e`](/training/constraint-layout/motionlayout/ref/keyattribute)\nnodes. These nodes specify the position or attributes of a target view at a\nspecific point in the motion.\n[`MotionLayout`](/reference/androidx/constraintlayout/motion/widget/MotionLayout)\nsmoothly animates the view from the starting point to each intermediate point\nand then to the final destination.\n\nSuppose the initial state of the motion sequence has an opaque ball in the\nlower-left corner of the view, and the final state makes the ball transparent in\nthe upper-right corner. By default, the `MotionLayout` moves the ball smoothly\nin a diagonal line, gradually becoming transparent until it vanishes when it\nreaches its destination. By using `\u003cKeyFrameSet\u003e`, you can change this behavior.\nFor example, you can make the ball move vertically to the upper-left corner\nwhile remaining entirely opaque, then move horizontally to the upper-right\ncorner while fading out. You can do this by creating a `\u003cKeyFrameSet\u003e` and\nadding a `\u003cKeyPosition\u003e` and `\u003cKeyAttribute\u003e` inside it. The `\u003cKeyPosition\u003e`\nspecifies the intermediate location of the ball, and the `\u003cKeyAttribute\u003e`\nspecifies that the ball remains opaque at the midpoint of the motion.\n\nSyntax\n------\n\n```xml\n\u003cKeyFrameSet\u003e\n [ \u003cKeyPosition/\u003e... ]\n [ \u003cKeyAttribute/\u003e...]\n\u003c/KeyFrameSet\u003e\n```\n\nContained in\n------------\n\n[`\u003cTransition\u003e`](/training/constraint-layout/motionlayout/ref/transition)\n\nContains\n--------\n\n[`\u003cKeyPosition\u003e`](/training/constraint-layout/motionlayout/ref/keyposition)\n: Specifies a view's position at a specific moment during the motion sequence.\n\n[`\u003cKeyAttribute\u003e`](/training/constraint-layout/motionlayout/ref/keyattribute)\n: Specifies view attributes at a specific moment during the motion sequence."]]