|
int dividerCount = lastItemDecorated ? childCount : childCount - 1; |
I used this divider in the last item with a dropdown. When the itemView is clicked then shows a textView from gone to visible state and it is working ok (the divider is not showed) but when the view collapses the textView (from visible to gone) then the childcount is increased one time and decreased very quick, showing and hiding the divider very fast.
Maybe using the itemCount from adapter and not the childCount could fix the problem. I tried this approach using a custom ItemDecorator overriding the onDrawOver and it is working, but i dont know if is the best solution.
Update: The blink appears when is called the method notifyItemChanged(pos, item)