简体   繁体   中英

how to set default number keyboard in edittext

using EditText i want to use phone keyboard (with letters) by default(!), but using

android:inputType="phone"

android disables letters input when i change keyboard softly. and i'm also need to use letters when it need how should i declare inputType or something else to use phone keyboard by default and don't lose letters input ability?

As you can read on the documentation: http://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType

You can use two type of inputTypes: Must be one or more (separated by '|') of the following constant values.

So, you should use something like: android:inputType="phone|text"

[]s Neto

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM