I try to write the following in the fragment :

recyclerView.addItemDecoration(new DividerItemDecoration(this, LinearLayoutManager.VERTICAL)); 

The error is predictable, since I prescribe the same in the fragment, and not in the activation - cannot be applied , but I don’t find a solution to this problem.

    1 answer 1

    Not quite clear from the description of what the problem is ... But you can try this:

     recyclerView.addItemDecoration(new DividerItemDecoration(getContext(), LinearLayoutManager.VERTICAL));