Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ItemDecoration 绘制问题 #9

Closed
hyvenzhu opened this issue Oct 10, 2017 · 3 comments
Closed

ItemDecoration 绘制问题 #9

hyvenzhu opened this issue Oct 10, 2017 · 3 comments
Labels
information required Further information from the user is required

Comments

@hyvenzhu
Copy link

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

@fondesa
Copy link
Owner

fondesa commented Oct 11, 2017

@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
Copy link

ghost commented Oct 14, 2017

@hiphonezhu Are you using the an emulator ?

@fondesa
Copy link
Owner

fondesa commented Nov 1, 2017

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

@fondesa fondesa closed this as completed Nov 1, 2017
@fondesa fondesa added the invalid This doesn't seem right label May 23, 2019
@fondesa fondesa added information required Further information from the user is required and removed invalid This doesn't seem right labels Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information required Further information from the user is required
Projects
None yet
Development

No branches or pull requests

2 participants