Reputation: 13632
I created the standard "hello world" application from Juno 4.21 and SDK 21 Api 17. Accepting all the defaults from Eclipse
I added a single edittext field NAME using the drag and drop graphical interface. I did not add any logic to the activity
Running with a Nexus 7 device Android 4.2 I get the following error repeatedly
E/SpannableStringBuilder(6610): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
When I run on the Emulators however including Nexus 7 emulator I get no error, also on my Huawei ICS 4.0.3 device it works fine. This leads me to believe this a my be a problem with my Nexus 7.
Is there someone who could test this on this on a Nexus 7 or other 4.2 device please.
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/textView1"
android:layout_below="@+id/textView1"
android:ems="10"
android:inputType="textPersonName" >
<requestFocus />
</EditText>
Upvotes: 0
Views: 5237
Reputation: 602
So I have not been able to come up with a good explanation WHY this happens, but it appears to have something to do with the Autocomplete. I have a standard login dialog box that displays a username and password field. The only way I've gotten it to behave is by:
this.username.setInputType( InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS );
this.password.setInputType( InputTypeTYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS );
This could also be done in the XML using the corresponding tags.
Upvotes: 2