Android Question @ symbol in soft keyboard

jimseng

Active Member
Licensed User
Longtime User
Hello.
I have an edit text for email addresses. I have been searching to no avail as to how to have the @ character on the keyboard without having to press the ?123 button. I am sure this is easy but I can't find it.
 

LucasHeer

Active Member
Licensed User
Longtime User
Hello.
I have an edit text for email addresses. I have been searching to no avail as to how to have the @ character on the keyboard without having to press the ?123 button. I am sure this is easy but I can't find it.

Hello!

This is definitely possible:

B4X:
Dim use_suggestions As Boolean = False
Dim INPUT_TYPE_TEXT As Int = 0x00000001
Dim INPUT_TYPE_EMAIL As Int = 0x00000020
Dim INPUT_TYPE_NOSUGGESTIONS As Int = 0x00080000

Dim et As EditText = txt_username.NativeTextField
et.InputType = Bit.Or(Bit.Or(INPUT_TYPE_TEXT, INPUT_TYPE_EMAIL), INPUT_TYPE_NOSUGGESTIONS)
If(use_suggestions) Then
    et.InputType = Bit.Or(INPUT_TYPE_TEXT, INPUT_TYPE_EMAIL)
Else
    et.InputType = Bit.Or(Bit.Or(INPUT_TYPE_TEXT, INPUT_TYPE_EMAIL), INPUT_TYPE_NOSUGGESTIONS)
End If

I am using AS_TextFieldAdvanced for my EditText, but you would replace "et" with your EditText.

Or simply:
B4X:
et.InputType = 33

You can also enable or disable suggestions on your preference. The above code will replace the comma with "@" on most phones:
Screenshot_20260116-173641.png
 
Last edited:
Upvote 0

jimseng

Active Member
Licensed User
Longtime User
Thanks. I will try this. I can't find where a reference or tutorial is for this. I have seen the EMI tutorial but is there a list of input types shown somewhere?
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
Thanks. I will try this. I can't find where a reference or tutorial is for this. I have seen the EMI tutorial but is there a list of input types shown somewhere?

Android development, here is the complete list of android:inputType values for both XML and Jetpack Compose, organized by category:

1. Numeric Types
Optimized for digits and calculations.
  • number: Standard integer input.
  • numberDecimal: Allows a decimal point.
  • numberSigned: Allows a minus sign (-) for negative numbers.
  • numberPassword: Numeric keypad with hidden dots for PINs.

2. Text Types
Triggers the full QWERTY keyboard with specific variations.
  • text: Default plain text.
  • textCapCharacters: Forces all capital letters.
  • textCapWords: Capitalizes the first letter of every word.
  • textCapSentences: Capitalizes the first letter of every sentence.
  • textAutoCorrect: Enables system-level spell check and suggestions.
  • textPassword: Standard text password (hidden characters).
  • textVisiblePassword: Password field that remains readable.
  • textEmailAddress: Includes the @ and .com shortcuts.
  • textUri: Optimized for URLs (includes / and .com).
  • textPersonName: Optimized for names.
  • textShortMessage: For SMS/messaging apps.
  • textLongMessage: For long-form text (emails, descriptions).
  • textMultiLine: Allows the "Enter" key to create new lines.
  • textNoSuggestions: Explicitly disables keyboard predictions.

3. Special Format Types
  • phone: Phone dialer pad with *, #, and +.
  • date: Numeric keypad for entering dates.
  • time: Numeric keypad for entering time.
  • datetime: Combined keypad for both date and time.
  • postalAddress: Optimized for physical addresses.

4. Jetpack Compose Equivalent (KeyboardType)
If you are using Jetpack Compose (recommended for 2026), you use the KeyboardType property:
  • KeyboardType.Text
  • KeyboardType.Number
  • KeyboardType.Decimal
  • KeyboardType.Phone
  • KeyboardType.Email
  • KeyboardType.Password
  • KeyboardType.NumberPassword
  • KeyboardType.Uri


For more technical details, visit the official Android InputType Documentation
 
Upvote 0
Top