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

自定义标注倍数 #30

Open
123124123sad opened this issue Jul 1, 2020 · 6 comments
Open

自定义标注倍数 #30

123124123sad opened this issue Jul 1, 2020 · 6 comments

Comments

@123124123sad
Copy link

我们安卓开发需要看2.75倍的标注,希望可以设置自定义

@hallee9000
Copy link
Owner

@123124123sad 什么情况下需要这个倍数呢?

@123124123sad
Copy link
Author

123124123sad commented Aug 17, 2020 via email

@Eden-Harris
Copy link

@123124123sad 什么情况下需要这个倍数呢?

我们也希望能够自定义倍数,比如设计师设计的页面是1440,但是实际需要的为1920,这个时候就需要特殊的倍数了,否则设计师重新调整的任务量比较大。同时,在一些跨平台应用上,使用特殊的单位和倍数就很方便,例如 4.5px = 1upx

@dawei135
Copy link

dawei135 commented Jan 6, 2022

安卓还是希望可以定义到1080那个尺寸进行开发。

现在没有办法定义,而且xxhdpi和mdpi两个像素密度下,字号是相反的。目前只能基于mdpi下的字号,把单位改为sp. 间距也不能用,要在mdpi下把间距*0.8

想问问大家跟安卓的交付有没有好的方法呀

@hallee9000
Copy link
Owner

选择 xxhdpi 数值变小是对的,这个像素密度是指你设计稿设计时的像素密度:你按照 xxhdpi 设计,也就是三倍图设计,但是开发使用 dp 单位,这个单位会自动根据像素密度渲染,也就是一倍图的单位,所以交付工具会把你设计稿的尺寸除以 3,我在帮助文档写了。

https://docs.heron.design/designer/#%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E9%80%89%E4%BA%86-2x-%E6%A0%87%E6%B3%A8%E5%8F%98%E6%88%90%E4%B8%80%E5%8D%8A%E4%BA%86

@hallee9000
Copy link
Owner

没有增加自定义宽度或者倍数的计划,如果需要一稿适配多端,可以使用 auto layout 和 constraints 设计出自适应的设计稿,复制出来更改尺寸。自定义宽度或者倍数无法预期最终开发实现效果,最后的还原可能惨不忍睹。

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

4 participants