I am not that familiar with ktx, but if I have a `...
# android
a
I am not that familiar with ktx, but if I have a
fragment
with a
recyclerviewMain
, in
onCreateView
if I type
recyclerviewMain
than it is in the suggested list but when run
recyclerviewMain.setAdapter(adapter)
fail as it is null. If I do
view.findViewById<RecyclerView>(R.id.recyclerviewMain).setAdapter(adapter)
works. So do we need
findViewById
in fragments or I am doing it wrong?