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

  1. Thank you,


    exactly what I was looking for...

    ReplyDelete
  2. Thanks,

    Exactly what I was looking for...

    ReplyDelete
  3. thanks for the solution. that's very help me

    ReplyDelete
  4. Thank you for solving my error

    ReplyDelete
  5. saved me!!!
    thanks for this xml file entry..

    ReplyDelete

Post a Comment

Popular posts from this blog

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

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

Exception handling with RestTemplate