I\'m trying to set my custom drawable (line) for DividerItemDecoration, but with no success. Where is the mistake?
DividerItemDecoration dividerItemDecoration =
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(getContext(),
LinearLayoutManager.HORIZONTAL);
dividerItemDecoration.setDrawable(getContext().getResources().getDrawable(R.drawable.line_decoration));
recyclerView.addItemDecoration(dividerItemDecoration);
DividerItemDecoration dividerItemDecorationVertical = new DividerItemDecoration(getContext(),
LinearLayoutManager.VERTICAL);
dividerItemDecorationVertical.setDrawable(getContext().getResources().getDrawable(R.drawable.line_decoration));
recyclerView.addItemDecoration(dividerItemDecorationVertical);