我尝试使用PercentFrameLayout,但是出现了以下错误提示:
Binary XML file line #: You must supply a layout_width attribute.
这是我使用的XML文件:
<android.support.percent.PercentFrameLayout
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_heightPercent="50%"
app:layout_marginLeftPercent="25%"
app:layout_marginTopPercent="25%"
app:layout_widthPercent="50%"/>
</android.support.percent.PercentFrameLayout>
这是一个错误还是我的失误?