أنواع لوحة المفاتيح وإجراءات IME
اعرض لوحة المفاتيح وزر الإرسال المناسبين
أنواع لوحة المفاتيح وإجراءات IME درس مجاني في Jetpack Compose Academy على CoddyKit. هذا هو الدرس 3 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في 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/7) وفتح باقي دورة Jetpack Compose Academy، انتقل إلى CoddyKit PRO. تتضمن دورة Jetpack Compose Academy 4 دروس في المجموع.
ماذا ستتعلم في «أنواع لوحة المفاتيح وإجراءات IME»؟
اعرض لوحة المفاتيح وزر الإرسال المناسبين تتمرن على Jetpack Compose Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ Jetpack Compose Academy؟
لا تُشترط خبرة سابقة. Jetpack Compose Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 3 من أصل 4.
كم من الوقت يستغرق درس «أنواع لوحة المفاتيح وإجراءات IME»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس Jetpack Compose Academy هذا؟
نعم. كل درس في Jetpack Compose Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- TextField وOutlinedTextField
- التسميات والعناصر النائبة والأيقونات البادئة
- أنواع لوحة المفاتيح وإجراءات IME
- التحقق المضمّن وحالات الخطأ