Recyclerview Itemdecoration Ondraw
The spec for RecyclerView.ItemDecoration says that onDraw(Canvas c, RecyclerView parent) is deprecated. Instead, they say to override onDraw(Canvas, RecyclerView, RecyclerView.St
Solution 1:
OnDraw()
will be called by RecyclerView
with proper state set, you need not call it yourself. Also, its recommended to override onDrawOver()
of RecyclerView.ItemDecoration
instead.
An example of a decoration that draws divider lines between RecyclerView items: https://gist.github.com/alexfu/0f464fc3742f134ccd1e
Post a Comment for "Recyclerview Itemdecoration Ondraw"