I want to be able to start a new activity using the Intent class. I know how to start an activity by using these lines of code:
Intent myIntent = new Intent(v.ge
@Override
public void onItemClick(AdapterView> parent, View view, int position, long id) {
Intent intent = null;
switch(position) {
case 1:
intent = new Intent(getApplicationContext(), Activity2.class);
startActivity(intent);
break;
case 2:
intent = new Intent(getApplicationContext(), Activity3.class);
startActivity(intent);
break;
default:
}
}
});