我在 Eclipse Juno 中遇到错误,代码如下:
FilmListAdapter listAdapter = new FilmListAdapter(this,
R.layout.film_list_items, data);
listViewInstance.setAdapter(listAdapter);
listViewInstance.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> getView, View view, int i, long l) {
Toast.makeText(getApplicationContext(),
"click is performed", Toast.LENGTH_SHORT)
.show();
}
});
当我添加 @Override 时,它会给我一个错误并且无法编译。没有它,它会编译,但点击不起作用。