ListView listview=(ListView)findViewById(R.id.listder);
listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {
if (position == 0) {
Intent int0 = new Intent(getApplicationContext(), gnrl.class);
startActivity(int0);
}
else if (position == 1) {
Intent int1 = new Intent(getApplicationContext(), asf.class);
startActivity(int1);
}
else if (position == 2) {
Intent int2 = new Intent(getApplicationContext(), ThirdActivity.class);
startActivity(int2);
}
else if (position == 3) {
Intent int3 = new Intent(getApplicationContext(),
FourthActivity.class);
startActivity(int3);
}
}
});
6
solved click listview item go->new activity?