Can't Start New Activity
Good day, I try to start new Activity from another. But it always crashed. Here My code. It is the event on ListView. list.setOnItemClickListener(new OnItemClickListener(){
Solution 1:
instead of
Intent i = new Intent(view.getContext(), StudentInfoActivity.class);
change to
Create static object of that activity
e.g Activity actOne =null;
public static actOne a ;
a = this;
Intent i = new Intent(a, StudentInfoActivity.class);
Solution 2:
try this one.
Intent i = new Intent(getApplicationContext(), StudentInfoActivity.class);
i.putExtra("studentId", selectedId);
startActivity(i);
Post a Comment for "Can't Start New Activity"