findViewById Explicit Type

#1

My problem is, I find strange that R.id.item_all_material_text… are “unresolved reference”. Tried to remove the explicit type but it returns to view type

Snippet code:

val view = LayoutInflater.from(activity).inflate(R.layout.item_all_material_text, null)
val textInputLayout = view.findViewById<TextInputLayout>(R.id.item_all_material_text_til)
val textInputEditText = view.findViewById<TextInputEditText>(R.id.item_all_material_text_tie)