レイアウトのパフォーマンスを改善する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Compose を試す
Jetpack Compose は、Android に推奨される UI ツールキットです。Compose でレイアウトを操作する方法を学習します。
レイアウトは Android アプリの要であり、ユーザー エクスペリエンスに直接影響を与えます。レイアウトを適切に実装しないと、UI が遅くなり、アプリでメモリを大量に消費する可能性があります。Android SDK には、レイアウトのパフォーマンスの問題を特定するのに役立つツールが用意されています。このドキュメントでは、最小限のメモリ使用量でスムーズ スクロール インターフェースを実装できます。
レッスン
- レイアウト階層を最適化する
- 複雑なウェブページが読み込み時間を遅らせるのと同様に、レイアウト階層が複雑なとパフォーマンスの問題が発生する可能性があります。このドキュメントでは、SDK ツールを使用してレイアウトを検査し、パフォーマンスのボトルネックを見つける方法について説明します。
- <include> でレイアウトを再利用する
- アプリ UI が特定のレイアウト構造を複数の場所で繰り返す場合、このドキュメントでは効率的で再利用可能なレイアウト構造を作成し、適切な UI レイアウトに含める方法について説明します。
- オンデマンドでビューを読み込む
- 別のレイアウト内に 1 つのレイアウト コンポーネントを含めるだけでなく、アクティビティの実行後に必要な場合にのみ、組み込まれるレイアウトを表示することもできます。このドキュメントでは、レイアウトの一部をオンデマンドで読み込んで、レイアウトの初期化パフォーマンスを改善する方法について説明します。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-26 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-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."]]