طرح بندی های نسبی و سفارشی

ورودی‌ها، محتوا یا سایر اقدامات ممکن است نسبت به یکدیگر یا محدود به یک کانتینر والد ظاهر شوند. طرح‌بندی‌ها می‌توانند سفارشی‌تر باشند، اما مطمئن شوید که از گروه‌بندی، ستون‌ها و فاصله‌گذاری ثابتی پیروی می‌کنند.

Authentication is a common relative layout, as shown in the following figure. A custom layout describes how UI elements relate to each other.

مهار

طرح‌بندی‌ها همچنین می‌توانند از ترکیبی از انواع طرح‌بندی استفاده کنند. برای مثال، می‌توانید یک چرخ فلک یا اسکرول افقی را با کارت‌های عمودی جفت کنید، یا می‌توانید یک نمودار سفارشی با داده‌های لیست عمودی ارائه دهید.

شبکه گروه بندی

شما می‌توانید محتوا را در ردیف‌ها یا ستون‌های پیمایشی با ردیف‌های تنبل و ستون‌های تنبل ارائه دهید.

طرح‌بندی تمام‌صفحه یکی دیگر از طرح‌بندی‌های رایج است که در حالت فراگیر (immersive mode) استفاده می‌شود.

شکل ۲۷: طرح‌بندی تمام صفحه، همانطور که در حالت فراگیر استفاده می‌شود

If you're working with Views instead of Compose, you can use ConstraintLayout to lay out views according to relationships between sibling views and the parent layout, allowing for large and complex layouts. ConstraintLayout lets you build entirely by dragging and dropping instead of editing the XML using the layout editor. Learn more about building a UI with Layout Editor .

درباره اصول اولیه طرح‌بندی Compose و اجزای تشکیل‌دهنده یک Composable بیشتر بدانید.

Webviews

A Webview is a view that displays in-app web pages. In most cases, we recommend using a standard web browser, like Chrome, to deliver content to the user. To learn more about web browsers, read the guide for invoking a browser with an intent .