I have one recycler view, when clicking on the Recycler view item it goes to some other activity. Again if I come back from that activity to Main activity, I should show the same recycler view position. I cant use finish() , in this case. If i am using finish then I can able to be in the same recycler view position. But in my case i cant use that. After come back from second activity i need to refresh the api again to update the values, so if finish the activity i cant get the Api changes. And i tried to do by calling OnRestoresavedInstance state, but in that case I am facing null pointer exception. Is there any way to get back the same recycler view poistion when i am coming from second activity? i Used this Link to sort out my problem. But doesn't find any result.
please help me out of this. Thank you in advance.