Unresolved reference: LAYOUT_INFLATER_SERVICE inside onBindViewHolder
问题 Inside OnBindViewHolder of my RecyclerView Adapter , I got multiple items. One of those (ITEM_TRATAMENTOS) got a setOnClickListener which has the purpose of create an LinearLayout when I click in an button (add_field_btn). The problem is that the only argument of getSystemService is unresolved ( Context.LAYOUT_INFLATER_SERVICE ). In ViewPagers it works fine, but inside OnBindViewHolder, it's not the case. ITEM_TRATAMENTOS ->{ val viewHolderTratamentos = holder as ViewHolderItemTratamentos