android – Setting up EditText with "url" inputType-ThrowExceptions

Exception or error:

I am trying to make an EditText such that when i click it a key board containing “.com” appears because a url is to be intered into the EditText.
I tried to use this: android:inputType="textUri" but it is not working. How do i do it?

How to solve:

try this one

<EditText 
        android:id="@+id/edt"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:inputType="textWebEmailAddress"
        />

android:inputType=”textWebEmailAddress”
use this property for that.

###

You can use inputType as textWebEmailAddress or textEmailAddress. Specs say it is device dependent but honestly I did not find any difference. Purpose of using this is you can use the @ and .com keys in the keypad. I tried both on samsung Galaxy S5 and keypad is the same.

enter image description here

Leave a Reply

Your email address will not be published. Required fields are marked *