I have a chat app and one the problems I haven't been able to solve is
the EditText input box stops showing text after a while. I've verified
the problem myself but it seems to depend on the IME you use. I use
HTC's ime and have never had the problem. For purposes of finding the
problem, I switched to stock Android ime and the problem showed up
quite quickly.

After a bit of typing and sending messages, once you type, the
EditText no longer seems to redraw and show the input. If you hide the
IME, the text reappears.

The problem _seems_ to have started around the time I made an option
for disabling/enabling auto correction and capitalization. The code
I'm using for that is below:

final boolean auto =
prefs.getBoolean(getString(R.string.pref_auto_cap_correct), true);

int types = mEt.getInputType();
types = auto
     ? types | (InputType.TYPE_TEXT_FLAG_AUTO_CORRECT |
InputType.TYPE_TEXT_FLAG_CAP_SENTENCES)
     : types & ~(InputType.TYPE_TEXT_FLAG_AUTO_CORRECT |
InputType.TYPE_TEXT_FLAG_CAP_SENTENCES);

mEt.setInputType(types);

and my layout xml is:

    <EditText
        android:id="@+id/et"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_above="@id/suggest_sb"
        android:layout_toRightOf="@id/status"
        android:nextFocusRight="@+id/sv"
        android:nextFocusLeft="@+id/sv"
        android:imeOptions="actionSend"
        android:layout_toLeftOf="@id/arrow_right"
        android:inputType="textLongMessage"
    />

I'd _really_ like to get to the bottom of this.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to