1

I am trying to start an Activity A having GridView as layout from an AsyncTask T. But it can not start A and shows

SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length

error in logcat.

This is happening only in Samsung Galaxy as far as I know. Its working in Galaxy SII with 4.2.2 but not in Galaxy SIII with 4.0.4.

Any help will be appreciated.

aman.nepid
  • 2,864
  • 8
  • 40
  • 48

3 Answers3

1

Seems this will make the error go away, but it may be an inappropriate solution in some cases.

android:inputType="textNoSuggestions" or android:inputType="textEmailAddress|textNoSuggestions" etc.

Android - SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length

Community
  • 1
  • 1
vimal1083
  • 8,499
  • 6
  • 34
  • 50
0

Try not to call

Spannable.setSpan(Object, int, int, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);

when your Spannable length is zero.

For example, your code should look something like this:

Spannable string = ...
if (string.length() != 0) string.setSpan(Object, int, int Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
Moz
  • 109
  • 2
  • 10
-1

When I uninstalled the facebook app from my android, the separate app I designed runs as usual. This must be a serious bug with facebook.

Orman
  • 34
  • 3