- syntax:
<layout android:defaultHeight="integer" android:defaultWidth="integer" android:gravity=["top" | "end" | ...] android:minHeight="integer" android:minWidth="integer" />
- contained in:
<activity>
- description:
- Contains attributes that affect how an activity behaves in multi-window mode.
- attributes:
android:defaultHeight
- Default height of the activity when launched in free-form mode.
android:defaultWidth
- Default width of the activity when launched in free-form mode.
android:gravity
- Initial placement of the activity when launched in free-form mode.
See
Gravity
for suitable values. android:minHeight
- Minimum height for the activity in both split-screen and free-form modes. If the user moves the divider in split-screen mode to make an activity smaller than the specified minimum, the system crops the activity to the height the user requests.
android:minWidth
- Minimum width for the activity in both split-screen and free-form modes. If the user moves the divider in split-screen mode to make an activity smaller than the specified minimum, the system crops the activity to the width the user requests.
- introduced in:
- API Level 24
- see also:
<activity>
<layout>
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# <layout\u003e\n\nsyntax:\n:\n\n ```xml\n \u003clayout android:defaultHeight=\"integer\"\n android:defaultWidth=\"integer\"\n android:gravity=[\"top\" | \"end\" | ...]\n android:minHeight=\"integer\"\n android:minWidth=\"integer\" /\u003e\n ```\n\ncontained in:\n: [\u003cactivity\u003e](/guide/topics/manifest/activity-element)\n\ndescription:\n: Contains attributes that affect how an activity behaves in multi-window mode.\n\nattributes:\n:\n\n `android:defaultHeight`\n : Default height of the activity when launched in free-form mode.\n\n `android:defaultWidth`\n : Default width of the activity when launched in free-form mode.\n\n `android:gravity`\n : Initial placement of the activity when launched in free-form mode.\n See [Gravity](/reference/android/view/Gravity) for suitable values.\n\n `android:minHeight`\n : Minimum height for the activity in both split-screen and free-form modes. If the user moves the divider in\n split-screen mode to make an activity smaller than the specified minimum, the system crops the activity to the\n height the user requests.\n\n `android:minWidth`\n : Minimum width for the activity in both split-screen and free-form modes. If the user moves the divider in\n split-screen mode to make an activity smaller than the specified minimum, the system crops the activity to the\n width the user requests.\n\n introduced in:\n : API Level 24\n\n see also:\n : [\u003cactivity\u003e](/guide/topics/manifest/activity-element)"]]