我开始此活动时,我的应用程序崩溃。我在我的布局中定义了一个编辑文本,并在我的活动的onCreate内部实例化。我正在为我的Edittext创建监听器。Edittext addTextChangedListener崩溃
mTextView = (EditText) findViewById(R.id.edit_text);
mTextView.setInputType(InputType.TYPE_CLASS_TEXT);
mTextView.addTextChangedListener(new TextWatcher() {
public void onTextChanged(CharSequence s, int start, int before,
int count) {
}
public void afterTextChanged(Editable s) {
// TODO Auto-generated method stub
}
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
// TODO Auto-generated method stub
}
});
你可以发布堆栈跟踪吗? – Damian
你可以发布logcat输出,所以我们可以看到堆栈跟踪? – Chris