エディタのアクション
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Android Studio のエディタ領域内には、Jetpack Compose を使用して生産性を向上させる機能が用意されています。
ライブ テンプレート
Android Studio には、次のような Compose 関連のライブ テンプレートが用意されています。ライブ テンプレートを使用すると、対応するテンプレートの短縮名を入力してコード スニペットをすばやく挿入できます。
comp
: @Composable
関数を設定する
prev
: コンポーズ可能な関数 @Preview
を作成する
paddp
: padding
修飾子を dp で追加する
weight
: weight
修飾子を追加する
W
、WR
、WC
: 現在のコンポーザブルを Box
、Row
、または Column
コンテナで囲む
ガターアイコン
ガターアイコンは、サイドバーにある行番号の横に表示されるコンテキスト アクションです。Android Studio では、デベロッパーのエクスペリエンスを向上させるために、Jetpack Compose 固有のガターアイコンがいくつか導入されています。
プレビューをデプロイする
@Preview
は、エミュレータまたは物理デバイスに、ガターアイコンから直接デプロイできます。
カラー選択ツール
コンポーザブルの内部または外部で色が定義されている場合、プレビューがガターに表示されます。次のように、カラー選択ツールをクリックすることで色を変更できます。
画像リソース選択ツール
コンポーザブルの内部または外部でドローアブル、ベクター、画像が定義されている場合、プレビューがガターに表示されます。次のように、画像リソース選択ツールをクリックすることで、ドローアブル、ベクター、画像を変更できます。
あなたへのおすすめ
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-09-03 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-09-03 UTC。"],[],[],null,["Android Studio has features inside the editor area to improve your productivity\nwith Jetpack Compose.\n\nLive templates\n\nAndroid Studio comes with these Compose-related live templates, which allow you\nto enter code snippets for fast insertion by typing the corresponding template\nabbreviation:\n\n- `comp` to set up a `@Composable` function\n- `prev` to create a `@Preview` composable function\n- `paddp` to add a `padding` Modifier in dp\n- `weight` to add a `weight` Modifier\n- `W`, `WR`, `WC` to surround the current composable with a `Box`, `Row`, or `Column`container\n\nGutter icons\n\nGutter icons are contextual actions visible on the sidebar, next to the line\nnumbers. Android Studio introduces several gutter icons specific to Jetpack\nCompose to ease your developer experience.\n\nDeploy preview\n\nYou can deploy a `@Preview` to the emulator or physical device directly from the\ngutter icon:\n\nColor picker\n\nWhenever a color is defined inside or outside a composable, its preview is shown\non the gutter. You can change the color via the color picker by clicking on it\nlike this:\n\nImage resource picker\n\nWhenever a drawable, vector, or image is defined inside or outside a composable,\nits preview is shown on the gutter. You can change it via the image resource\npicker by clicking on it like this:\n\nRecommended for you\n\n- Note: link text is displayed when JavaScript is off\n- [Compose layout basics](/develop/ui/compose/layouts/basics)\n- [Compose modifiers](/develop/ui/compose/modifiers)\n- [Lists and grids](/develop/ui/compose/lists)"]]