I am creating a RecyclerView with hard-coded content, and the elements are displayed correctly, but I want to put an Item Decoration, but it is displayed on the RecyclerView, I want it to be displayed below.
I tried creating a custom LinePagerIndicatorDecoration class by extending it, and changing the height of the Indicator but it didn't work.
recyclerNew?.apply {
layoutManager = LinearLayoutManager(_context, RecyclerView.HORIZONTAL, false)
addItemDecoration(LinePagerIndicatorDecoration(_context))
adapter = newsAdapter
setHasFixedSize(true)
invalidate()
}
The ItemDecoration is shown above the recycler, and I wanti it below.
Someone can help me?
You can use ItemDecoration like this: