我有RecyclerView
里面Fragment
处理ViewPager
。 RecyclerView 自动旋转后如何恢复其状态?我以为我必须自己实施为什么RecyclerView在旋转后恢复其状态?
LayoutManager.onSaveInstanceState()
LayoutManager.onRestoreInstanceState(Parcelable state);
。 LayoutManager
或RecyclerView
注册某种onConfigurationChange
接收器?
看看这个答案:http://stackoverflow.com/questions/28236390/recyclerview-store-restore-state-between-activities – BenjaminBihr
没有,既不LayoutManger也不RecyclerView将收到onconfigurationchage。 –
@BenjaminBihr它没有提到我的问题。我在问,为什么要恢复国家的工作,而不是明确地实施。 – AppiDevo