You’re calling LayoutInflater.from
as if you were calling a constructor:
LayoutInflater inflater = new LayoutInflater.from(parent.getContext());
That’s a mixture of constructor-call syntax (new
) and method call syntax (.from
). It would work if LayoutInflater.from
were a static nested class, but it’s not… it’s just at static method. So you want:
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
solved can not resolve symbol ‘from’ Error in Android Studio