``` val srl_view = view?.findViewById(R.id.refresh...
# announcements
a
Copy code
val srl_view = view?.findViewById(R.id.refresh_servers) ?: return
val srl = srl_view as SwipeRefreshLayout
m
argoneus: there is an extension function for that. use
view.find<RefreshLayout>(R.id.refresh_servers)
. or just access the view directly by it’s name if you are suing kotlin extensions
or this:
val sr: SwipeRefreshLayout = view?.find(R.id.viewid)