W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection
W/IInputConnectionWrapper: getExtractedText on inactive InputConnection
W/IInputConnectionWrapper: getSelectedText on inactive InputConnection
W/IInputConnectionWrapper: getTextAfterCursor on inactive InputConnection
W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection
我出现这种问题的情况是:
对一个输入框添加了输入监听,但是在监听中又对这个输入框进行了一次赋值,导致循环赋值,最终造成应用卡死。
错误代码:
appCompatEditText.addTextChangedListener(new TextWatcher() {
@Override
public void onTextChanged(CharSequence s, int start, int before,
int count) {
double a = 1;
double b = 2;
appCompatEditText.setText((Math.min(a, b))+"");
}
@Over