listview监听失效
为什么?
lv_file_main.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
switch (position){
case 0:
Toast.makeText(DownloadActivity.this, "000000000000000", Toast.LENGTH_SHORT).show();
break;
case 1:
Toast.makeText(DownloadActivity.this, "111111111111111", Toast.LENGTH_SHORT).show();
break;
case 2:
Toast.makeText(DownloadActivity.this, "2222222222222222", Toast.LENGTH_SHORT).show();
break;
case 3:
Toast.makeText(DownloadActivity.this, "3333333333333333", Toast.LENGTH_SHORT).show();
break;
}
}
});