<KeyAttribute>
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
গতি ক্রম চলাকালীন একটি নির্দিষ্ট মুহুর্তে দর্শন বৈশিষ্ট্যগুলি নির্দিষ্ট করে৷ ভিউ এর স্ট্যান্ডার্ড অ্যাট্রিবিউট সেট করতে আপনি <KeyAttribute>
ব্যবহার করতে পারেন।
ধরুন একটি ভিউ এর অপাসিটি ( android:alpha
) প্রাথমিক <ConstraintSet>
-এ 0 এবং চূড়ান্ত <ConstraintSet>
এ 1 সেট করা হয়েছে। ডিফল্টরূপে, এটি পুরো গতি ক্রমটির জন্য দৃশ্যটিকে রৈখিকভাবে বিবর্ণ করে তোলে। আপনি যদি চান যে দৃশ্যটি মোশন সিকোয়েন্সের 80% জন্য অদৃশ্য থাকে এবং তারপরে দ্রুত বিবর্ণ হয়ে যায়, তাহলে একটি <KeyAttribute>
নোড যোগ করুন motion:framePosition
অ্যাট্রিবিউট 80 এ সেট করুন এবং android:alpha
অ্যাট্রিবিউট সেট করুন 0।
সিনট্যাক্স
<KeyAttribute
motion:motionTarget="@id/targetPath"
motion:framePosition="percentage"
[ attribute = value ]
/>
গুণাবলী
-
motion:motionTarget
- দেখুন কার গুণাবলী এই
<KeyAttribute>
দ্বারা নিয়ন্ত্রিত হয়। -
motion:framePosition
- 1 থেকে 99 পর্যন্ত পূর্ণসংখ্যা নির্দিষ্ট করে যখন মোশন সিকোয়েন্সে ভিউতে এই
<KeyAttribute>
দ্বারা নির্দিষ্ট করা বৈশিষ্ট্য থাকে। উদাহরণস্বরূপ, যদি framePosition
25 হয়, তাহলে দৃশ্যে গতি ক্রমটির মাধ্যমে এক-চতুর্থাংশ পথের নির্দিষ্ট বৈশিষ্ট্য রয়েছে।
আপনি নিম্নলিখিত দর্শন বৈশিষ্ট্য সেট করতে পারেন. এই বৈশিষ্ট্যগুলি সম্পর্কে আরও তথ্যের জন্য, View
রেফারেন্স পৃষ্ঠাটি দেখুন।
-
android:alpha
-
android:elevation
-
android:rotation
-
android:rotationX
-
android:rotationY
-
android:scaleX
-
android:scaleY
-
android:translationX
-
android:translationY
-
android:translationZ
-
android:visibility
-
transitionPathRotate
এর মধ্যে রয়েছে
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# <KeyAttribute>\n\nSpecifies view attributes at a specific moment during the motion sequence. You\ncan use `\u003cKeyAttribute\u003e` to set the view's [standard attributes](/reference/android/support/constraint/motion/MotionLayout#standard-attributes).\n\nSuppose a view's opacity (`android:alpha`) is set to 0 in the initial\n`\u003cConstraintSet\u003e` and 1 in the final `\u003cConstraintSet\u003e`. By default, this makes\nthe view linearly fade in for the entire motion sequence. If you want the view\nto remain invisible for 80% of the motion sequence and then fade in quickly, add\na `\u003cKeyAttribute\u003e` node with the `motion:framePosition` attribute set to 80 and\nthe `android:alpha` attribute set to 0.\n\nSyntax\n------\n\n```xml\n\u003cKeyAttribute\n motion:motionTarget=\"@id/targetPath\"\n motion:framePosition=\"percentage\"\n [ attribute = value ]\n/\u003e\n```\n\nAttributes\n----------\n\n`motion:motionTarget`\n: View whose attributes are controlled by this `\u003cKeyAttribute\u003e`.\n\n`motion:framePosition`\n: Integer from 1 to 99 specifying when in the motion sequence the view has the\n attributes specified by this `\u003cKeyAttribute\u003e`. For example, if `framePosition`\n is 25, then the view has the specified attributes one-quarter of the way\n through the motion sequence.\n\nYou can set the following view attributes. For more information about these\nattributes, see the [`View`](/reference/android/view/View) reference page.\n\n- `android:alpha`\n- `android:elevation`\n- `android:rotation`\n- `android:rotationX`\n- `android:rotationY`\n- `android:scaleX`\n- `android:scaleY`\n- `android:translationX`\n- `android:translationY`\n- `android:translationZ`\n- `android:visibility`\n- `transitionPathRotate`\n\nContained in\n------------\n\n- [`\u003cKeyFrameSet\u003e`](/training/constraint-layout/motionlayout/ref/keyframeset)"]]