0Pricing
Jetpack Compose Academy · レッスン

Text、Outlined、Iconボタン

用途に合ったボタンのバリエーションを選びます。

「Text、Outlined、Iconボタン」はCoddyKit上の無料Jetpack Compose Academyレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはJetpack Compose Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Jetpack Compose Academyコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

Buttons Have Personalities

Not every action deserves a bold filled button. Compose offers several button variants, each signaling a different level of emphasis. 🎨

The Filled Button

The standard Button is filled and high-emphasis. It draws the eye, so save it for the one primary action per screen.

Button(onClick = { pay() }) {
    Text("Pay now")
}

OutlinedButton for Secondary

An OutlinedButton has just a border and no fill. It reads as a clear-but-secondary choice sitting next to a filled one.

OutlinedButton(onClick = { cancel() }) {
    Text("Cancel")
}

TextButton for Low Emphasis

A TextButton shows only a label, no border or fill. It is perfect for quiet actions like Learn more or dialog choices.

TextButton(onClick = { dismiss() }) {
    Text("Not now")
}

Emphasis Is a Hierarchy

Think of it as a ladder of emphasis: filled is loudest, outlined is medium, text is quietest. Match the variant to the action's weight.

Icons Inside Buttons

Any button can hold an Icon plus a label in its content row. Add a small spacer so the icon and text do not touch.

Button(onClick = { add() }) {
    Icon(Icons.Default.Add, null)
    Spacer(Modifier.width(8.dp))
    Text("Add")
}

The IconButton

An IconButton is a compact, label-free tap target holding just one icon. It is ideal for toolbars and app-bar actions.

IconButton(onClick = { share() }) {
    Icon(Icons.Default.Share, "Share")
}

Always Describe Your Icon

Give an icon-only button a contentDescription so screen readers can announce it. A null description hides it from accessibility.

IconButton(onClick = { favorite() }) {
    Icon(Icons.Default.Favorite, "Favorite")
}

FilledIconButton for Emphasis

Need an icon button that stands out? FilledIconButton adds a solid background, raising its emphasis above the plain version.

FilledIconButton(onClick = { record() }) {
    Icon(Icons.Default.Mic, "Record")
}

Pick the Right Variant

Choosing well guides users: filled for Confirm, outlined for an alternative, text for dismiss, IconButton for tight spaces.

Same onClick, Different Look

Every variant shares the same onClick contract. You change only the visual weight, never how you wire up the action.

Quick Check

You want a quiet, low-emphasis action with only a label and no border or fill.

Recap: Right Tool, Right Tap

You now have a toolbox: filled Button, OutlinedButton, TextButton, and IconButton. Match emphasis to the action and label your icons. ✨

よくある質問

「Text、Outlined、Iconボタン」レッスンは無料ですか?

はい。「Text、Outlined、Iconボタン」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Jetpack Compose Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Jetpack Compose Academyコースには全4レッスンが含まれています。

「Text、Outlined、Iconボタン」で何を学びますか?

用途に合ったボタンのバリエーションを選びます。 ブラウザで直接実行するハンズオンコードでJetpack Compose Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

Jetpack Compose Academyを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのJetpack Compose Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。

「Text、Outlined、Iconボタン」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このJetpack Compose Academyレッスンでコードを書いて実行できますか?

はい。すべてのJetpack Compose Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. ButtonとonClick
  2. Text、Outlined、Iconボタン
  3. 有効、無効、読み込み中の状態
  4. 任意のComposableでclickableを使う
← Jetpack Compose Academyに戻る