Tipi di tastiera e azioni IME
Mostri la tastiera e il pulsante di invio corretti.
Tipi di tastiera e azioni IME è una lezione Jetpack Compose Academy gratuita su CoddyKit. Questa è la lezione 3 di 4. Puoi leggere la lezione completa qui gratuitamente — poi esercitati direttamente nel browser con un editor di codice integrato e un tutor IA disponibile 24/7. Fa parte del percorso di apprendimento Jetpack Compose Academy, e i tuoi progressi si sincronizzano tra il web e l'app CoddyKit. Il corso Jetpack Compose Academy include 4 lezioni in totale.
Parti di questa lezione non sono ancora state tradotte e vengono mostrate in inglese.
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. 🎯
Domande Frequenti
La lezione «Tipi di tastiera e azioni IME» è gratuita?
Sì — il testo completo di «Tipi di tastiera e azioni IME» è gratuito qui sul web. Per esercitarvi in modo interattivo (un editor di codice integrato e un tutor IA 24/7) e sbloccare il resto del corso Jetpack Compose Academy, passa a CoddyKit PRO. Il corso Jetpack Compose Academy include 4 lezioni in totale.
Cosa imparerò in «Tipi di tastiera e azioni IME»?
Mostri la tastiera e il pulsante di invio corretti. Eserciti Jetpack Compose Academy con codice pratico che esegui direttamente nel browser, e un tutor IA 24/7 risponde alle tue domande mentre lavori sulla lezione.
Ho bisogno di esperienza per iniziare Jetpack Compose Academy?
Non è richiesta alcuna esperienza precedente. Jetpack Compose Academy su CoddyKit è strutturato per principianti e studenti avanzati, quindi puoi iniziare da qui o dall'inizio e procedere al tuo ritmo. Questa è la lezione 3 di 4.
Quanto tempo richiede la lezione «Tipi di tastiera e azioni IME»?
La maggior parte delle lezioni CoddyKit richiede circa 5–10 minuti. Ogni lezione è breve e interattiva, quindi fai progressi costanti e riprendi esattamente da dove hai lasciato su web e app.
Posso scrivere ed eseguire codice in questa lezione Jetpack Compose Academy?
Sì. Ogni lezione Jetpack Compose Academy include un editor di codice integrato, quindi scrivi ed esegui codice reale direttamente nel tuo browser e ricevi feedback istantaneo dall'IA — nessuna configurazione locale necessaria.
Tutte le lezioni di questo corso
- TextField e OutlinedTextField
- Etichette, segnaposto e icone iniziali
- Tipi di tastiera e azioni IME
- Convalida inline e stati di errore