リストビューでアイテムをクリックすることで新しいインテントを開始しようとしていますが、これを機能させる方法がわかりません。
コードは次のとおりです。
final ListView lv = getListView();
lv.setTextFilterEnabled(true);
lv.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
@SuppressWarnings("unchecked")
Intent intent = new Intent(this, Profileviewer.class);
startActivity(intent);
}
});
でコンパイラエラーが発生しますnew Intent(this, Profileviewer.class);
The constructor Intent(new AdapterView.OnItemClickListener(){}, Class<Profileviewer>) is undefined