- সিনট্যাক্স:
<property android:name="string" android:resource="resource specification" android:value="string" />
- এর মধ্যে রয়েছে:
-
<activity>
<activity-alias>
<application>
<provider>
<receiver>
<service>
- বর্ণনা:
- অতিরিক্ত, নির্বিচারে ডেটার একটি আইটেমের জন্য একটি নাম-মানের জোড়া যা মূল উপাদানে সরবরাহ করা যেতে পারে। একটি কম্পোনেন্ট এলিমেন্টে যেকোন সংখ্যক
<property>
সাব এলিমেন্ট থাকতে পারে। বৈধ নামগুলির মধ্যেPackageManager
ক্লাসে সংজ্ঞায়িত যেকোনও সম্পত্তির ধ্রুবক অন্তর্ভুক্ত থাকে,PackageManager.Property
WindowProperties
মতো ক্লাসে সংজ্ঞায়িত প্রপার্টি ট্যাগ এবং অ্যাডহক সংজ্ঞায়িত নির্বিচারে ধ্রুবক।PackageManager.getProperty()
পদ্ধতি ব্যবহার করে পৃথকভাবে মান প্রাপ্ত করুন।android:value
বৈশিষ্ট্যের সাথে সাধারণ মানগুলি নির্দিষ্ট করুন৷android:resource
অ্যাট্রিবিউট সহ রিসোর্স আইডি নির্দিষ্ট করুন।android:value
এবংandroid:resource
উভয়ই উল্লেখ করা অবৈধ৷উদাহরণস্বরূপ,
zoo
নামের জন্য@string/kangaroo
রিসোর্সে যে মান সংরক্ষিত আছে তা নিম্নোক্ত কোড বরাদ্দ করে:<property android:name="zoo" android:value=”@string/kangaroo” />
এখানে কোডটি, তবে, সম্পদের সাংখ্যিক আইডি বরাদ্দ করে, সম্পদে সংরক্ষিত মান নয়,
zoo
:<property android:name="zoo" android:resource=”@string/kangaroo” />
- গুণাবলী:
-
android:name
- সম্পত্তির নাম। একাধিক, সহোদর
<property>
ট্যাগের নাম একই থাকলে পার্সিং ত্রুটির ফলাফল। -
android:resource
- একটি সম্পদ একটি রেফারেন্স. সম্পদের ID হল সম্পত্তির জন্য নির্ধারিত মান।
PackageManager.Property.getResourceId()
দ্বারা সম্পত্তি থেকে আইডি পুনরুদ্ধার করা যেতে পারে। -
android:value
- সম্পত্তিতে নির্ধারিত একটি মান। নিম্নলিখিত সারণী মান বৈশিষ্ট্যের জন্য বৈধ ডেটা প্রকার এবং অ্যাক্সেসর পদ্ধতি তালিকাভুক্ত করে:
টাইপ PackageManager.Property Accessor স্ট্রিং: অক্ষর এড়ানোর জন্য ডবল ব্যাকস্ল্যাশ (\\) ব্যবহার করুন; উদাহরণস্বরূপ, একটি ইউনিকোড অক্ষরের জন্য \\n
এবং\\uxxxxx
getString()
পূর্ণসংখ্যা: উদাহরণস্বরূপ, 100
getInteger()
বুলিয়ান: হয় true
বাfalse
getBoolean()
রঙ: আকারে #rgb
,#argb
,#rrggbb
, বা#aarrggbb
getInteger()
ফ্লোট: উদাহরণস্বরূপ, 1.23
getFloat()
দ্রষ্টব্য: একটি
<property>
ট্যাগেandroid:value
এবংandroid:resource
বৈশিষ্ট্য উভয়ই থাকা উচিত নয়। যদি তা হয়,android:resource
পছন্দ করা হয়।-
- প্রবর্তিত:
- API স্তর 31
<সম্পত্তি>
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-29 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-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# <property\u003e\n\nsyntax:\n:\n\n ```xml\n \u003cproperty android:name=\"string\"\n android:resource=\"resource specification\"\n android:value=\"string\" /\u003e\n ```\n\ncontained in:\n: [\u003cactivity\u003e](/guide/topics/manifest/activity-element)\n\n [\u003cactivity-alias\u003e](/guide/topics/manifest/activity-alias-element)\n\n [\u003capplication\u003e](/guide/topics/manifest/application-element)\n\n [\u003cprovider\u003e](/guide/topics/manifest/provider-element)\n\n [\u003creceiver\u003e](/guide/topics/manifest/receiver-element)\n\n [\u003cservice\u003e](/guide/topics/manifest/service-element)\n\ndescription:\n: A name-value pair for an item of additional, arbitrary data that can be supplied to the\n parent component. A component element can contain any number of `\u003cproperty\u003e` subelements. Valid names\n include any of the [property constants](/reference/android/content/pm/PackageManager#constants_1) defined in\n the [PackageManager](/reference/android/content/pm/PackageManager) class,\n [PackageManager.Property](/reference/android/content/pm/PackageManager.Property) tags defined\n in classes such as [WindowProperties](/reference/kotlin/androidx/window/WindowProperties), and arbitrary constants defined ad hoc. Obtain values individually using the\n [PackageManager.getProperty()](/reference/android/content/pm/PackageManager#getProperty(java.lang.String,%20java.lang.String)) method.\n\n Specify ordinary values with the [android:value](/guide/topics/manifest/property-element#val)`\n ` attribute. Specify resource IDs with the\n [android:resource](/guide/topics/manifest/property-element#rsrc) attribute. Specifying\n both `android:value` and `android:resource` is invalid.\n\n\n For example, the following code assigns whatever value is stored in the `@string/kangaroo` resource to\n the `zoo` name:\n\n\n ```xml\n \u003cproperty android:name=\"zoo\" android:value=”@string/kangaroo” /\u003e\n ```\n\n\n The code here, however, assigns the numeric ID of the resource, not the value stored in the resource, to\n `zoo`:\n\n\n ```xml\n \u003cproperty android:name=\"zoo\" android:resource=”@string/kangaroo” /\u003e\n ```\n\nattributes:\n:\n\n `android:name`\n : The name of the property. A parsing error results if multiple, sibling `\u003cproperty\u003e` tags have the\n same name.\n\n `android:resource`\n : A reference to a resource. The ID of the resource is the value assigned to the property. The ID can be retrieved\n from the property by\n [PackageManager.Property.getResourceId()](/reference/android/content/pm/PackageManager.Property#getResourceId()).\n\n `android:value`\n : A value assigned to the property. The following table lists valid data types and accessor methods for the value\n attribute: \n\n\n | Type | PackageManager.Property accessor |\n |-----------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------|\n | String: Use double backslashes (\\\\\\\\) to escape characters; for example, `\\\\n` and `\\\\uxxxxx` for a Unicode character | [getString()](/reference/android/content/pm/PackageManager.Property#getString()) |\n | Integer: For example, `100` | [getInteger()](/reference/android/content/pm/PackageManager.Property#getInteger()) |\n | Boolean: Either `true` or `false` | [getBoolean()](/reference/android/content/pm/PackageManager.Property#getBoolean()) |\n | Color: In the form `#rgb`, `#argb`, `#rrggbb`, or `#aarrggbb` | [getInteger()](/reference/android/content/pm/PackageManager.Property#getInteger()) |\n | Float: For example, `1.23` | [getFloat()](/reference/android/content/pm/PackageManager.Property#getFloat()) |\n\n\nintroduced in:\n: API Level 31"]]