2

Possible Duplicate:
android:inputType=“textEmailAddress” - '@' key and a '.com' key?

In my project I have an EditText in which user should enter his E-mail. How can I add ".com" button to Android Keyboard?

This is my code:

<EditText 
android:id="@+id/etEmail"
android:inputType="text|textEmailAddress"
android:singleLine="true"
android:layout_span="4"
android:textSize="15sp"
android:imeOptions="actionNext"
/>

==========> Update:

I had this problem in my Emulator (and still have actually). but when i checked on real device, Samsung Galaxy S2, I saw ".com" button. Therefore, on real device there is no problem. But my suggestion for emulator users is go to Settings/Language & Keyboard and then clear the tick of Chines Language and Japanese IME. So, you can see "@" in keyboard (but still there is no ".com" button in AVD 2.2).

Community
  • 1
  • 1
Hesam
  • 52,260
  • 74
  • 224
  • 365
  • Given the number of different keyboards available for Android devices, the fact that they're their own packages I seriously doubt this is in the least bit feasible. – Matt Lacey Dec 15 '11 at 02:11

1 Answers1

0

I suppose that android:inputType should be set to textEmailAddress only - specially if this is a field for email. But this option will not work for some devices - SE xperia, for example, does not provide any special keyboard for email input. For other devices it should work.

Jin35
  • 8,602
  • 3
  • 32
  • 52