How do I properly set SwipeRefreshLayout on Android Studio with kotlin?
问题 I'm trying to use a SwipeRefreshLayout on my project, but there's something wrong... and I don't know what! Below I show the kotlin code, XML and the error I'm getting. NOTE, it's a FRAGMENT KOTLIN CODE: override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) swipeRefresh.setOnRefreshListener { refreshAction() // refresh your list contents somehow swiperefresh_saloes.isRefreshing = false } } XML CODE <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns