On the official guide on RecyclerView, is written
recyclerView = findViewById<RecyclerView>(R.id.my_recycler_view).apply {
// use this setting to improve performance if you know that changes
// in content do not change the layout size of the RecyclerView
setHasFixedSize(true)
// use a linear layout manager
layoutManager = viewManager
I cannot get the meaning of the angle bracket,
my intuition is that they are similar to the keyword as
, is that correct?
recyclerView = view.findViewById<RecyclerView>(R.id.recycler_view) as RecyclerView
that I use in my Fragment( please notice the variable view
that I declarated into onCreateView
val view = inflater!!.inflate(R.layout.bezinning_fragment, container, false)