- sintassi:
<layout android:defaultHeight="integer" android:defaultWidth="integer" android:gravity=["top" | "end" | ...] android:minHeight="integer" android:minWidth="integer" />
- contenuto in:
<activity>
- description:
- Contiene attributi che influiscono sul comportamento di un'attività in modalità multi-finestra.
- attributi:
android:defaultHeight
- Altezza predefinita dell'attività avviata in modalità in formato libero.
android:defaultWidth
- Larghezza predefinita dell'attività avviata in modalità in formato libero.
android:gravity
- Posizionamento iniziale dell'attività avviata in modalità in formato libero.
Consulta
Gravity
per i valori idonei. android:minHeight
- Altezza minima per l'attività sia in modalità schermo diviso che in formato libero. Se l'utente sposta il divisore all'interno schermo diviso per ridurre il numero di attività minimo specificato, il sistema ritaglia l'attività l'altezza richiesta dall'utente.
android:minWidth
- Larghezza minima per l'attività sia in modalità schermo diviso che in formato libero. Se l'utente sposta il divisore all'interno schermo diviso per ridurre il numero di attività minimo specificato, il sistema ritaglia l'attività la larghezza richiesta dall'utente.
- introdotto in:
- Livello API 24
- vedi anche:
<activity>
<layout>
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-07-27 UTC.
[null,null,["Ultimo aggiornamento 2025-07-27 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)"]]