15
似乎新的百分比支持库已发布,但不允许引用维度xml文件中的百分比值。缺少PercentRelativeLayout百分比值的XML资源类型?
也就是说,代替:
<android.support.percent.PercentRelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<ImageView
app:layout_widthPercent="50%"
app:layout_heightPercent="50%"
app:layout_marginTopPercent="25%"
app:layout_marginLeftPercent="25%"/>
</android.support.percent.PercentFrameLayout/>
能够像那样代码的东西:
<android.support.percent.PercentRelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<ImageView
app:layout_widthPercent="@percent/myWidthPercent"
app:layout_heightPercent="@percent/my/HeightPercent"
app:layout_marginTopPercent="@percent/myMarginTophPercent"
app:layout_marginLeftPercent="@percent/myMarginLeftPercent"/>
其中myWidthPercent是在资源文件中定义。
我错了吗(我是否错过了另一个名称)还是我们可以发送给谷歌的功能请求?
你怎么像我在第一行得到错误使用此标记