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

不能使用px #6

Open
EthanCo opened this issue Nov 21, 2017 · 2 comments
Open

不能使用px #6

EthanCo opened this issue Nov 21, 2017 · 2 comments

Comments

@EthanCo
Copy link

EthanCo commented Nov 21, 2017

使用dp分割线太粗了,希望可以使用px作为单位

@yanyusong
Copy link
Owner

yanyusong commented Nov 22, 2017

嗯,用dp的话是可以支持float类型的,可以使用比如:0.5dp、0.3dp等,在不同分辨率的屏幕上渲染时系统会根据dp和px的转化系数,自动选择最相近的整数px值,会有相对一致的体验。假如用px的话,可能就不能保证这种适配性了。假如你想用1px的话,你可以用0.5dp或者0.4dp来代替,可能会有相同的效果

@EthanCo
Copy link
Author

EthanCo commented Nov 23, 2017

似乎不行,使用LinearLayoutManager的时候,小于1dp,比如0.3dp,分割线就直接不显示了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants