0Pricing
Jetpack Compose Academy · Lección

Tipos de teclado y acciones IME

Muestre el teclado y el botón de envío adecuados.

Tipos de teclado y acciones IME es una lección gratuita de Jetpack Compose Academy en CoddyKit. Esta es la lección 3 de 4. Puedes leer la lección completa abajo gratuitamente — luego la practicas en el navegador con un editor de código integrado y un tutor de IA 24/7. Forma parte de la ruta de aprendizaje de Jetpack Compose Academy, y tu progreso se sincroniza en la web y la app de CoddyKit. El curso de Jetpack Compose Academy incluye 4 lecciones en total.

Partes de esta lección aún no han sido traducidas y se muestran en inglés.

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. 🎯

Preguntas frecuentes

¿La lección «Tipos de teclado y acciones IME» es gratis?

Sí — el texto completo de «Tipos de teclado y acciones IME» es gratis para leer aquí en la web. Para practicarla de forma interactiva (editor de código integrado y tutor de IA 24/7) y desbloquear el resto del curso de Jetpack Compose Academy, actualiza a CoddyKit PRO. El curso de Jetpack Compose Academy incluye 4 lecciones en total.

¿Qué aprenderé en «Tipos de teclado y acciones IME»?

Muestre el teclado y el botón de envío adecuados. Practicas Jetpack Compose Academy con código real que ejecutas directamente en el navegador, y un tutor de IA 24/7 responde tus preguntas mientras trabajas en la lección.

¿Necesito experiencia previa para empezar Jetpack Compose Academy?

No se requiere experiencia previa. Jetpack Compose Academy en CoddyKit está estructurado para principiantes hasta estudiantes avanzados, así que puedes empezar aquí o desde el inicio y avanzar a tu ritmo. Esta es la lección 3 de 4.

¿Cuánto tiempo toma la lección «Tipos de teclado y acciones IME»?

La mayoría de las lecciones de CoddyKit toman alrededor de 5–10 minutos. Cada una es compacta e interactiva, así que avanzas constantemente y retomas exactamente por donde dejaste en la web y la app.

¿Puedo escribir y ejecutar código en esta lección de Jetpack Compose Academy?

Sí. Cada lección de Jetpack Compose Academy incluye un editor de código integrado, así que escribes y ejecutas código real directamente en tu navegador y obtienes retroalimentación instantánea de IA — sin configuración local necesaria.

Todas las lecciones de este curso

  1. TextField y OutlinedTextField
  2. Etiquetas, marcadores de posición e iconos iniciales
  3. Tipos de teclado y acciones IME
  4. Validación en línea y estados de error
← Volver a Jetpack Compose Academy