-
Notifications
You must be signed in to change notification settings - Fork 22
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
app:layout_design_density="1" 这个属性是多少? #3
Comments
readme 太老了,没更新,给我点时间,过段时间更新个完整的。 density的值就是 design_density 就是设计图的 density 比如说设计图是给MX5设计的,那么他的 design_density 就是 MX5 的 |
期待最新的版本 |
还有一个问题 我们拿到的设计图纸都是px作为单位的,直接在布局文件中写dp,这个 我们也不知道啊 难道难道是根据 比如说 12800*800 10.1‘ 这就是mdpi,然后我们就按照1px==1dp 这样写吗?’ |
给你们的是px,你就写px就好了,不用自己转换了。 |
更新了一版,有任何问题,欢迎反馈。 |
简单试了一下 很不错 谢谢分享 |
注意事项 |
|
app:layout_scale_by="height" |
请问在application中配置config时,所填的 Design Density 这个值 目前只能取int类型的,但实际上这个值得到的是float类型的 如果说这个设计值是1.5 或者 1.8之类的 那 会不会影响整个布局呢? |
会,应该算不准了,我马上更新一下。ScaleConfig 类需要改动一下。其实本来存的就是 float,构造方法属性写错了。 |
好了
ScaleConfig.create(this, 1080, 1920, 3f, ScaleConfig.DIMENS_UNIT_DP); |
试用了一下 很不错
这个可以理解为160-->1 320-->2 吗?
因为是int类型的 那么 240呢?
还有这个lib是不是太老了 连你说的一定要加上的三个design属性都没有加上去啊?
还望分享一下最新的lib,谢谢
The text was updated successfully, but these errors were encountered: