0
我想一個onItemClickListener添加到我的ListView問題創造onItemClickListener
streamListView.setAdapter(this.streamAdapter);
this.streamListView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> a, View v, int position, long id) {
Intent intent = new Intent(this, MessageDetailActivity.class);
startActivity(intent);
}
});
,但我得到的錯誤:
The constructor Intent(new AdapterView.OnItemClickListener(){}, Class<MessageDetailActivity>) is undefined