I have main fragment and I want to pass ArrayList to Activity class, where I will show the result in ListView.
Fragment class:
In your Activity:
Bundle bundle = getIntent().getExtras();
ArrayList allStudents = bundle.get("ExtraData");
and I think you need to define your ArrayAdapter as:
arrayAdapter = new ArrayAdapter(this, R.layout.student_list, allStudents);
You have the rest of the code, just add the above. It should work.