i**p 发帖数: 902 | 1 Eclipse asks me to remove "@Override" for afterTextChanged(),
beforeTextChanged() and onTextChanged(). However, the same code in the
Eclipse working on another working space has no problem.
Does anybody know the reason?
public class myActivity extends Activity implements TextWatcher
{
@Override
public void onCreate(Bundle savedInstanceState) {
...
}
@Override
public void afterTextChanged(Editable msg) {
....
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int
after) {
.......
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int
count) {
.....
} | Z*****Z 发帖数: 723 | 2 jdk version?
【在 i**p 的大作中提到】 : Eclipse asks me to remove "@Override" for afterTextChanged(), : beforeTextChanged() and onTextChanged(). However, the same code in the : Eclipse working on another working space has no problem. : Does anybody know the reason? : public class myActivity extends Activity implements TextWatcher : { : @Override : public void onCreate(Bundle savedInstanceState) { : ... : }
| i**w 发帖数: 883 | 3 正解,这个annotation在1.6才可以用在interface上
【在 Z*****Z 的大作中提到】 : jdk version?
| i**p 发帖数: 902 | 4 Thank you two! You are right. My Eclipse sets the project to use 1.5 by
default.
【在 i**w 的大作中提到】 : 正解,这个annotation在1.6才可以用在interface上
|
|