Open showkeyjar opened 2 years ago
I fig it out, because I use wrong Fragment Binding class
I must use
import com.ml.test.databinding.FragmentRecBinding
not
import com.ml.test.databinding.FragmentTopBinding
and this class is auto generate by Framework, and if u copy code, it has no error even use wrong class.
by the way, why user must care those class?
I create a RecycleView in FrameLayout which belong one Fragment but it sames that android can not recognize it. I tried binding.view_id and use findviewbyid, those functions all no use. android studio has no error, but do not display view.
this is my layout.xml
and this is my fragment.kt
and debug out put: findViewById can not be null