'लिखें' फ़ील्ड में बेहतर लेआउट
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Compose लेआउट के लिए जटिल डिज़ाइन बनाने का तरीका जानें. इसमें लेआउट फ़ेज़ और सीमाओं, सब-कंपोज़ लेआउट, और इंट्रिन्सिक मेज़रमेंट पर फ़ोकस किया गया है.
प्रमुख बिंदु
- लेआउट फ़ेज़, Compose का वह फ़ेज़ है जहां एलिमेंट का साइज़ और पोज़िशन तय की जाती है.
- लेआउट फ़ेज़ के दौरान, यूज़र इंटरफ़ेस (यूआई) ट्री में मौजूद हर एलिमेंट अपने चाइल्ड एलिमेंट का आकलन करता है. इससे पैरंट एलिमेंट अपने साइज़ का फ़ैसला ले पाता है और चाइल्ड एलिमेंट को उपलब्ध 2D स्पेस में डाल पाता है.
- पसंद के मुताबिक लेआउट बनाने के लिए,
Layout
कॉम्पोज़ेबल को कॉल करें. यह कॉम्पोज़ेबल कॉन्टेंट को अपने चाइल्ड के तौर पर स्वीकार करता है.
- सब-कंपोज़िशन की मदद से, स्क्रीन पर स्क्रोल करते समय, ज़रूरत के हिसाब से कॉन्टेंट जोड़ा जा सकता है.
- सब-कंपोज़ किए गए लेआउट से परफ़ॉर्मेंस पर असर पड़ सकता है. इस तरीके का इस्तेमाल तब करें, जब कम से कम एक बच्चे का कॉम्पोनेशन, किसी दूसरे बच्चे के मेज़रमेंट के नतीजे पर निर्भर हो.
- इनट्रिन्सिक मेज़रमेंट की मदद से, बच्चों की गतिविधियों को मेज़र करने से पहले उनसे क्वेरी की जा सकती है.
ऐसे संग्रह जिनमें यह गाइड शामिल है
यह गाइड, चुने गए क्विक गाइड के कलेक्शन का हिस्सा है. इसमें Android डेवलपमेंट के बड़े लक्ष्यों के बारे में बताया गया है:
सूची या ग्रिड दिखाना
सूचियों और ग्रिड की मदद से, आपके ऐप्लिकेशन में संग्रहों को ऐसे दिखाया जा सकता है कि वे उपयोगकर्ताओं को देखने में अच्छे लगें और उन्हें आसानी से समझ आएं.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-02-06 (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-02-06 (UTC) को अपडेट किया गया."],[],[],null,["# Advanced layouts in Compose\n\n\u003cbr /\u003e\n\nSee how to build complex designs for your Compose layouts, focusing on layout\nphase and constraints, subcompose layouts, and intrinsic measurements. \n\nKey points\n----------\n\n- The *layout phase* is the phase of Compose where element sizing and positioning is defined.\n- During the layout phase, each element in the UI tree measures its children, enabling the parent to decide its own size and placing the children in the available 2D space.\n- To build a custom layout, call the [`Layout`](/reference/kotlin/androidx/compose/ui/layout/package-summary#Layout(kotlin.collections.List,androidx.compose.ui.Modifier,androidx.compose.ui.layout.MultiContentMeasurePolicy)) composable, which accepts the composable content as its children.\n- Subcomposition enables lazy components to add content on demand while scrolling.\n- Subcomposed layouts can have an impact on performance. Use this approach when at least one child's composition depends on the result of another child's measurement.\n- Intrinsic measurements let you query children before they're measured.\n\nCollections that contain this guide\n-----------------------------------\n\nThis guide is part of these curated Quick Guide collections that cover\nbroader Android development goals: \n\n### Display a list or grid\n\nLists and grids allow your app to display collections in a visually pleasing form that's easy for users to consume. \n[Quick guide collection](/develop/ui/compose/quick-guides/collections/display-a-list-or-grid) \n\nHave questions or feedback\n--------------------------\n\nGo to our frequently asked questions page and learn about quick guides or reach out and let us know your thoughts. \n[Go to FAQ](/quick-guides/faq) [Leave feedback](https://issuetracker.google.com/issues/new?component=1573691&template=1993320)"]]