I am not able to create an intent after click in my Listview. After completing It gives an error
The application has stopped unexpectedly, please try again
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Intent IntentDiscution = new Intent(view.getContext(), lstchoi.class);
IntentDiscution.setClass(InterfaceAcceuil.this, lstchoi.class);
startActivityForResult(IntentDiscution, 0);
}
Make sure you declared
lstchoiin your manifest.xml. Assuming it is an Activity, you would do something like:You can also remove this line:
It is redundant because you used the constructor to indicate the same information.