Layoutleistung verbessern
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Schreiben Sie jetzt
Jetpack Compose ist das empfohlene UI-Toolkit für Android. Hier erfahren Sie, wie Sie in „Compose“ mit Layouts arbeiten.
Layouts sind ein wichtiger Bestandteil von Android-Apps, die sich direkt auf die Nutzererfahrung auswirken. Bei schlechter Implementierung kann das Layout der App bei langsamen Benutzeroberflächen viel Arbeitsspeicher verbrauchen. Das Android SDK enthält Tools, mit denen du Probleme mit der Layoutleistung ermitteln kannst. Mit dieser Dokumentation können Sie Oberflächen für optimiertes Scrollen mit minimalem Arbeitsspeicherbedarf implementieren.
Unterricht
- Layouthierarchien optimieren
- So wie eine komplexe Webseite die Ladezeit verlangsamen kann, kann eine komplexe Layouthierarchie zu Leistungsproblemen führen. In dieser Dokumentation wird gezeigt, wie Sie SDK-Tools verwenden können, um Ihr Layout zu prüfen und Leistungsengpässe zu erkennen.
- Layouts mit <include> wiederverwenden
- Wenn in Ihrer Anwendungs-UI bestimmte Layoutkonstrukte an mehreren Stellen wiederholt werden, erfahren Sie in dieser Dokumentation, wie Sie effiziente, wiederverwendbare Layoutkonstrukte erstellen und in die entsprechenden UI-Layouts einbinden.
- Aufrufe bei Bedarf laden
- Es kann auch sinnvoll sein, das enthaltene Layout nur dann sichtbar zu machen, wenn es nach dem Ausführen der Aktivität benötigt wird.
In dieser Dokumentation wird gezeigt, wie Sie die Initialisierungsleistung Ihres Layouts verbessern können, indem Sie Teile des Layouts bei Bedarf laden.
Alle Inhalte und Codebeispiele auf dieser Seite unterliegen den Lizenzen wie im Abschnitt Inhaltslizenz beschrieben. Java und OpenJDK sind Marken oder eingetragene Marken von Oracle und/oder seinen Tochtergesellschaften.
Zuletzt aktualisiert: 2025-07-26 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-26 (UTC)."],[],[],null,["# Improve layout performance\n\nTry the Compose way \nJetpack Compose is the recommended UI toolkit for Android. Learn how to work with layouts in Compose. \n[Performance in Compose →](/jetpack/compose/performance) \n\nLayouts are a key part of Android applications that directly affect the user experience. If\nimplemented poorly, your layout can make your app memory-intensive with slow UIs. The Android\nSDK includes tools to help identify problems in your layout performance. With this documentation,\nyou can implement smooth scrolling interfaces with a minimal memory footprint.\n\nLessons\n-------\n\n**[Optimize layout hierarchies](/develop/ui/views/layout/improving-layouts/optimizing-layouts)**\n: In the same way that a complex web page can slow down load time, a complex layout hierarchy\n can also cause performance problems. This documentation shows how you can use SDK tools to\n inspect your layout and discover performance bottlenecks.\n\n**[Reuse layouts with \\\u003cinclude\\\u003e](/develop/ui/views/layout/improving-layouts/reusing-layouts)**\n: If your application UI repeats certain layout constructs in multiple places, this\n documentation shows you how to create efficient, reusable layout constructs and include them\n in the appropriate UI layouts.\n\n**[Load views on demand](/develop/ui/views/layout/improving-layouts/loading-ondemand)**\n: Beyond including one layout component within another layout, you might want to\n make the included layout visible only when it's needed after the activity is running.\n This documentation shows how you can improve your layout's initialization performance by loading\n portions of your layout on demand."]]