fondesa / recycler-view-divider

A library which configures a divider for a RecyclerView.
Apache License 2.0
507 stars 45 forks source link

ItemDecoration 绘制问题 #9

Closed hyvenzhu closed 6 years ago

hyvenzhu commented 7 years ago

如果在 adapter 中设置 item 的背景色,divider 使用的也是背景色,会导致 item 背景色盖住 divider 的,我猜应该重写 ItemDecoration 的 onDrawOver 方法 而不是 onDraw ?

fondesa commented 7 years ago

@hiphonezhu I used Google Translate that translated your sentence in this one: "If you set the background color of the item in the adapter, the divider is also using the background color, which will cause the item background to cover the divider. I guess I should rewrite the ItemDecoration's onDrawOver method instead of onDraw?"

In this case, post here the layout of the cell of your adapter and the way you are using RecyclerViewDivider. Because, as you can see in the sample that I provided, the background color of the cell shouldn't be the problem

ghost commented 7 years ago

@hiphonezhu Are you using the an emulator ?

fondesa commented 6 years ago

@hiphonezhu Closing it for missing information. Feel free to re-open it in case.