Can't insert into Editable

I must be doing something obvious, but I can't figure out what it is. I'm simply trying to insert a character into an Editable:

@Override
public void afterTextChanged(Editable s) {
    Log.d(TAG, "inserting space at " + location);
    s.insert(location, " ");
    Log.d(TAG, "new word: '" + s + "'");
}

But s never changes. The string 's' is long enough, because I print it and it looks good. If I call Editable.clear(), it is cleared, and I can replace multiple characters with Editable.replace(). Ideas?

10
задан Sam 27 June 2014 в 19:49
поделиться