onRestoreInstanceState not working for RecyclerView layout manager if using Paging 3 library
- 阅读更多 关于 onRestoreInstanceState not working for RecyclerView layout manager if using Paging 3 library
问题 I had a problem in saving RecyclerView state and it solved by saving layout manager state and using it after resume fragment.(thanks to @HarisDautović) class TestFragment : Fragment() { private val testListAdapter: TestListAdapter by lazy { TestListAdapter() } override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View? { return inflater.inflate(R.layout.fragment_test, container, false) } override fun onViewCreated(view: View,