错误E / RecyclerView:未连接适配器;跳过布局(科特琳)

时间:2019-12-11 17:22:22

标签: android android-studio kotlin android-recyclerview instagram

我自己编程。一切都很好。然后我有一个错误。没有新的出版物添加到屏幕上。请帮帮我。 程序错误E / RecyclerView:未连接适配器;跳过布局

  

15:25:53.476 E / RecyclerView:未连接适配器;跳过布局

HomeFragment.kt

val view = inflater.inflate(R.layout.fragment_home, container, false)

var recyclerView: RecyclerView? = null
recyclerView = view.findViewById(R.id.recycler_view_home)

val linearLayoutManager = LinearLayoutManager(context)
linearLayoutManager.reverseLayout = true
linearLayoutManager.stackFromEnd = true
recyclerView.layoutManager = linearLayoutManager

postList = ArrayList()
postAdapter = context?.let { PostAdapter(it, postList as ArrayList<Post>) }
recyclerView.adapter = postAdapter

请帮助我解决问题。预先谢谢你。

0 个答案:

没有答案