Closed hyvenzhu closed 6 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
@hiphonezhu Are you using the an emulator ?
@hiphonezhu Closing it for missing information. Feel free to re-open it in case.
如果在 adapter 中设置 item 的背景色,divider 使用的也是背景色,会导致 item 背景色盖住 divider 的,我猜应该重写 ItemDecoration 的 onDrawOver 方法 而不是 onDraw ?