Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

m驼峰命名方法导致的bug #13

Open
MAIMIHO opened this issue Jul 19, 2016 · 2 comments
Open

m驼峰命名方法导致的bug #13

MAIMIHO opened this issue Jul 19, 2016 · 2 comments

Comments

@MAIMIHO
Copy link

MAIMIHO commented Jul 19, 2016

EditText用m驼峰命名方法生成的代码:
private EditText mEdit;
mEdit = (EditText) findViewById(R.id.edit);
private void submit() {
// validate
String editString = edit.getText().toString().trim();
if (TextUtils.isEmpty(editString)) {
Toast.makeText(this, "editString不能为空", Toast.LENGTH_SHORT).show();
return;
}
}

加粗的地方变量名不是mEdit, 导致找不到.

@suoyo
Copy link

suoyo commented Aug 25, 2016

难道作者不维护了么。。
editString不能为空如果能到名字就更好了

@boredream
Copy link
Owner

还在维护呢~ 最近工作比较忙 过段时间会统一处理一批问题~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants