रिसॉर्स टाइप की खास जानकारी
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
इस सेक्शन के हर पेज पर, किसी खास तरह के ऐप्लिकेशन रिसॉर्स के इस्तेमाल, फ़ॉर्मैट, और सिंटैक्स के बारे में बताया गया है. इस तरह के रिसॉर्स को प्रोजेक्ट की रिसॉर्स डायरेक्ट्री (res/
) में दिया जा सकता है.
यहां हर पेज के बारे में खास जानकारी दी गई है:
- ऐनिमेशन से जुड़े संसाधन
- पहले से तय किए गए ऐनिमेशन तय करें.
ट्रिन ऐनिमेशन, res/anim/
में सेव किए जाते हैं और R.anim
क्लास से ऐक्सेस किए जाते हैं.
फ़्रेम ऐनिमेशन, res/drawable/
में सेव किए जाते हैं और R.drawable
क्लास से ऐक्सेस किए जाते हैं.
- रंग की स्थिति की सूची का रिसॉर्स
View
स्थिति के आधार पर बदलने वाला रंग संसाधन तय करें.
res/color/
में सेव किया गया और R.color
क्लास से ऐक्सेस किया गया.
- ड्रॉ किए जा सकने वाले संसाधन
- बिटमैप या एक्सएमएल की मदद से अलग-अलग ग्राफ़िक तय करें.
res/drawable/
में सेव किया गया और R.drawable
क्लास से ऐक्सेस किया गया.
- लेआउट रिसॉर्स
- अपने ऐप्लिकेशन के यूज़र इंटरफ़ेस (यूआई) के लिए लेआउट तय करें.
res/layout/
में सेव किया गया और R.layout
क्लास से ऐक्सेस किया गया.
- मेन्यू का संसाधन
- अपने ऐप्लिकेशन के मेन्यू के कॉन्टेंट तय करें.
res/menu/
में सेव किया गया और R.menu
क्लास से ऐक्सेस किया गया.
- स्ट्रिंग संसाधन
- स्ट्रिंग, स्ट्रिंग कलेक्शन, और बहुवचन तय करें. साथ ही, स्ट्रिंग फ़ॉर्मैटिंग और स्टाइल शामिल करें.
res/values/
में सेव किया गया और R.string
, R.array
, और R.plurals
क्लास से ऐक्सेस किया गया.
- स्टाइल संसाधन
- यूज़र इंटरफ़ेस (यूआई) एलिमेंट के लुक और फ़ॉर्मैट को तय करें.
res/values/
में सेव किया गया और R.style
क्लास से ऐक्सेस किया गया.
- फ़ॉन्ट के संसाधन
- फ़ॉन्ट फ़ैमिली तय करें और एक्सएमएल में कस्टम फ़ॉन्ट शामिल करें.
res/font/
में सेव किया गया और R.font
क्लास से ऐक्सेस किया गया.
- संसाधन के अन्य टाइप
- अन्य प्राइमटिव वैल्यू को स्टैटिक रिसॉर्स के तौर पर तय करें. इनमें ये शामिल हैं:
- Bool
- ऐसा एक्सएमएल रिसॉर्स जिसमें बूलियन वैल्यू होती है.
- रंग
- एक्सएमएल रिसॉर्स, जिसमें रंग की हेक्साडेसिमल वैल्यू होती है.
- डाइमेंशन
- ऐसा एक्सएमएल रिसॉर्स जिसमें मेज़रमेंट की इकाई के साथ डाइमेंशन वैल्यू होती है.
- इंडोनेशिया
- ऐप्लिकेशन के संसाधनों और घटकों के लिए यूनीक आइडेंटिफ़ायर देने वाला एक्सएमएल रिसॉर्स.
- पूर्णांक
- ऐसा एक्सएमएल रिसॉर्स जिसमें पूर्णांक वैल्यू होती है.
- इंटिजर कलेक्शन
- एक्सएमएल रिसॉर्स, जो पूर्णांकों की सूची उपलब्ध कराता है.
- टाइप किया गया कलेक्शन
- एक्सएमएल संसाधन, जो
TypedArray
उपलब्ध कराता है. इसका इस्तेमाल, ड्रॉ किए जा सकने वाले आइटम की सूची के लिए किया जा सकता है.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया."],[],[],null,["# Resource types overview\n\nEach page in this section describes the usage, format, and syntax for a certain type\nof [app resource](/guide/topics/resources/providing-resources)\nthat you can provide in your project resources directory (`res/`).\n\nHere's a brief summary of each page:\n\n[Animation resources](/guide/topics/resources/animation-resource)\n: Define pre-determined animations. \n\n Tween animations are saved in `res/anim/` and accessed from the `R.anim` class. \n\n Frame animations are saved in `res/drawable/` and accessed from the `R.drawable` class.\n\n[Color state list resource](/guide/topics/resources/color-list-resource)\n: Define a color resource that changes based on the `View` state. \n\n Saved in `res/color/` and accessed from the `R.color` class.\n\n[Drawable resources](/guide/topics/resources/drawable-resource)\n: Define various graphics with bitmaps or XML. \n\n Saved in `res/drawable/` and accessed from the `R.drawable` class.\n\n[Layout resource](/guide/topics/resources/layout-resource)\n: Define the layout for your application UI. \n\n Saved in `res/layout/` and accessed from the `R.layout` class.\n\n[Menu resource](/guide/topics/resources/menu-resource)\n: Define the contents of your application menus. \n\n Saved in `res/menu/` and accessed from the `R.menu` class.\n\n[String resources](/guide/topics/resources/string-resource)\n: Define strings, string arrays, and plurals and include string formatting and styling. \n\n Saved in `res/values/` and accessed from the `R.string`, `R.array`,\n and `R.plurals` classes.\n\n[Style resource](/guide/topics/resources/style-resource)\n: Define the look and format for UI elements. \n\n Saved in `res/values/` and accessed from the `R.style` class.\n\n[Font resources](/guide/topics/resources/font-resource)\n: Define font families and include custom fonts in XML. \n\n Saved in `res/font/` and accessed from the `R.font` class.\n\n[More resource types](/guide/topics/resources/more-resources)\n: Define other primitive values as static resources, including the following:\n\n [Bool](/guide/topics/resources/more-resources#Bool)\n : XML resource that carries a boolean value.\n\n [Color](/guide/topics/resources/more-resources#Color)\n : XML resource that carries a hexadecimal color value.\n\n [Dimension](/guide/topics/resources/more-resources#Dimension)\n : XML resource that carries a dimension value with a unit of measure.\n\n [ID](/guide/topics/resources/more-resources#Id)\n : XML resource that provides a unique identifier for application resources and\n components.\n\n [Integer](/guide/topics/resources/more-resources#Integer)\n : XML resource that carries an integer value.\n\n [Integer array](/guide/topics/resources/more-resources#IntegerArray)\n : XML resource that provides an array of integers.\n\n [Typed array](/guide/topics/resources/more-resources#TypedArray)\n : XML resource that provides a [TypedArray](/reference/android/content/res/TypedArray), which you can use\n for an array of drawables."]]