Missing XML resource type for PercentRelativeLayout Percentage value?

对着背影说爱祢 提交于 2019-12-04 01:01:16

Use fraction instead of percent

<resources>
    <fraction name="myWidthPercent">50%</fraction>
...
</resources>

And referencing to it

<ImageView
    app:layout_widthPercent="@fraction/myWidthPercent"
    app:layout_heightPercent="@fraction/my/HeightPercent"
    app:layout_marginTopPercent="@fraction/myMarginTophPercent"
    app:layout_marginLeftPercent="@fraction/myMarginLeftPercent"/>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!