1
我有一个名为“text”的EditView。 我已经实现textWatcher无法将TextText设置为TextWatcher中的EditView
text.addTextChangedListener(this);
每当我试图EditView中设置在TextWatcher一定的价值,它是扔强行关闭。
下面的代码:
public void beforeTextChanged(CharSequence s, int start, int count,int after)
{
}
public void onTextChanged(CharSequence s, int start, int before, int end)
{
//text.setText("");
}
public void afterTextChanged(Editable s)
{
//text.setText("");
}
我的要求是:当用户键入某个值,则EditView中必须重新设置为空。 请帮我一把。
那么有什么错在那里这些意见?你可能想要实现'focusLost'监听器。 – GGrec
显示你的logcat.and如果可能的话把你所有的代码 –
它是一个TextView或EditText视图?用户在哪里输入值? – SKK