Error: This text field does not specify an inputType or a hint

If you have used EditText field in your android project you may get this error. EditText support multiple input type hence the error. 
E.g: You will get this error if you declare EditText as below:


    <EditText
        android:id="@+id/editText1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ems="10" >
        <requestFocus />
    </EditText>

Resolution: Include input type in the edittext field as below 

    <EditText
        android:id="@+id/editText1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ems="10"
        android:inputType="text" >
        <requestFocus />

    </EditText>
 

Comments

Post a Comment

Popular posts from this blog

Exception handling with RestTemplate

How to flash CWM Recovery to Samsung Galaxy SL( GT-I9003) using Odin

How to boot Samsung Galaxy SL( GT-I9003) in recovery mode