I design an app that has 2 activity, first (all_activity) contains a listview using BaseAdapter. when a user clicks in one of the items it will start a new activity(Story_Detalies ) contains an information for the items in the listview.
I make the (all_activity) parent for the (Story_Detalies)activity and by using this code in (Story_Detalies) activity
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
it will show an arrow to go to the previous activity.
the listview has a lot of items so when a user clicks on the arrow I want the listview to be scrolled to the same point that it was previously.
And this is my code for listview in oncreate():-
listView1 = (ListView) findViewById(R.id.lisallflashcard);
adapter = new AdapterAllQ(getApplicationContext(), rows, prgmImages2,stortype);
listView1.setAdapter(adapter);