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

你这个不支持控件宽度和高度的百分比啊 #3

Open
hanhailong opened this issue Aug 14, 2015 · 2 comments
Open

你这个不支持控件宽度和高度的百分比啊 #3

hanhailong opened this issue Aug 14, 2015 · 2 comments

Comments

@hanhailong
Copy link

举个例子,就是我的宽度设置了是屏幕的20%w,我想把控件的高度设置成此控件宽度的1.5倍,例如app:layout_heightPercentW="1.5" 而不是app:layout_heightPercent="30%w",希望作者加一个这样的功能!

@hongyangAndroid
Copy link
Owner

恩,因为是计算高度的时候子View的宽高还没有确定,如果支持您所说的可能需要多次测量,从而影响性能。还是建议通过计算设置比例。当然,如果你有好的思路,欢迎提交PR。

@guotaogithub
Copy link

官方的不是有这个app:layout_aspectRatio吗,宽高比

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

3 participants