I'm very new to Android Studio and I'm building an app that has a sidebar with icons that lead to fragments. After following a couple of tutorials, the sidebar is implemented and the icons each lead to a fragment. In one of the fragments I'd like to set up a RecyclerView and a CardView with the ability to make new entries and delete them. I tried following Coding in Flow's tutorial here, however, he is implementing it in the MainActivity, not a fragment. I tried putting them into a fragment using the same code up, which appeared to work fine, until he writes
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.example_item, parent);
Is there another way to define this inflator? Or possibly another tutorial I could refer too?