How can I go to another activity by clicking a list item?
myPDFListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@SuppressLint("IntentReset")
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
getSemesters getsemesters = getSemesters.get(position);
Intent intent = new Intent();
intent.setType(Intent.ACTION_VIEW);
startActivity(intent);
}
});
This is my old code. With this code I'm able to view the PDF's. But now what I want is when I am clicking on a list item it should go to a new activity with passing a string to another activity. What should be changed? Please suggest me.