How to retain selected item of Recycler view on changing screen orientation android?
问题 I want to retain the state of the RecyclerView's selected item whenever the screen orientation changes, but whenever I change the orientation, the selected item does not retain its state. So I save the position of the selected item and on orientation change in onResume() . I get the position and by using the RecyclerView's getChildAt() method I try to get the View of that item, but it returns null. I am in serious troubles, please help. @Override protected void onCreate(Bundle