0Pricing
Jetpack Compose Academy · レッスン

キーボードの種類とIMEアクション

適切なキーボードと送信ボタンを表示します。

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

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

The Right Keyboard Matters

Asking for a phone number? Show a number pad, not letters. The right keyboard makes typing fast and error-free. 📱

keyboardOptions

You shape the keyboard through keyboardOptions. It lets you pick the key layout and the action button shown on it.

TextField(
    value = phone,
    onValueChange = { phone = it },
    keyboardOptions = KeyboardOptions(/* ... */)
)

Pick a keyboardType

Set keyboardType to match the data: Number for digits, Email for addresses, Phone for dialing.

keyboardOptions = KeyboardOptions(
    keyboardType = KeyboardType.Email
)

Common Keyboard Types

Handy choices include Text, Number, Phone, Email, Decimal, and Password. Each one tweaks the keys to fit the input.

Hide Password Characters

For secrets, pair the Password type with a visualTransformation so each character shows as a dot. 🔒

visualTransformation = PasswordVisualTransformation()

IME Actions

The imeAction sets the keyboard's main button. Choose Next to move to the following field or Done to finish a form.

keyboardOptions = KeyboardOptions(
    imeAction = ImeAction.Next
)

Common IME Actions

Frequent actions are Next, Done, Search, Send, and Go. They tell the user what tapping the button will do.

React with keyboardActions

Respond to that button using keyboardActions. Run a search, submit the form, or jump focus to the next field.

keyboardActions = KeyboardActions(
    onDone = { submitForm() }
)

Move Focus on Next

For multi-field forms, use the FocusManager to move to the next input when the user taps Next.

keyboardActions = KeyboardActions(
    onNext = { focusManager.moveFocus(FocusDirection.Down) }
)

Type and Action Work Together

Set the keyboardType and imeAction together for each field. The result feels polished and effortless to fill in.

Small Touches, Big Polish

Matching the keyboard and its action to each field is a tiny effort that gives your forms a truly professional feel.

Quick Check

Which option controls the action button shown on the keyboard?

Recap

You tuned the keyboard: keyboardType picks the keys, imeAction labels the button, and keyboardActions responds to it. Smooth typing all around. 🎯

よくある質問

「キーボードの種類とIMEアクション」レッスンは無料ですか?

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

「キーボードの種類とIMEアクション」で何を学びますか?

適切なキーボードと送信ボタンを表示します。 ブラウザで直接実行するハンズオンコードでJetpack Compose Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

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

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

「キーボードの種類とIMEアクション」レッスンにはどのくらい時間がかかりますか?

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

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

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

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

  1. TextFieldとOutlinedTextField
  2. ラベル、プレースホルダー、先頭アイコン
  3. キーボードの種類とIMEアクション
  4. インライン検証とエラー状態
← Jetpack Compose Academyに戻る