I can\'t start a new activity clicking over an item in my listview. I want that onItemClick
can open the ApkInfoActivity
.. Actually when i click no
You need to use Intent, You can also pass the clicked listview item data to your new activity.
String classes[] = { "Quiz Trivia", "Sign A New User", "Friend List",
"Download A File", "Upload A File", "Select Pdf files", "Memory Game",
"Dzidza Maths", "Write Exam" };
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView> adapterView, View view, int i, long l) {
Intent intent = new Intent(getApplicationContext(),ApkInfoActivity.class);
intent.putExtra("name",classes[i]);
startActivity(intent);
}
});
}
Output:
You can find the whole tutorial here