标签:schema utf-8 nbsp ram 一行代码 enc encoding support XML
百分比布局失败(代码参考:第一行代码)
1 <?xml version="1.0" encoding="utf-8"?> 2 <android.support.percent.PercentFrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 xmlns:app="http://schemas.android.com/apk/res-auto" 4 android:layout_width="match_parent" 5 android:layout_height="match_parent"> 6 <Button 7 android:id="@+id/button1" 8 android:layout_gravity="left|top" 9 android:text="Button 1" 10 app:layout_heightPercent="30%" 11 app:layout_widthPercent="20%" 12 /> 13 14 <Button 15 android:id="@+id/button2" 16 android:layout_gravity="right|top" 17 android:text="Button 2" 18 app:layout_heightPercent="30%" 19 app:layout_widthPercent="80%" /> 20 21 <Button 22 android:id="@+id/button3" 23 android:layout_gravity="left|bottom" 24 android:text="Button 3" 25 app:layout_heightPercent="70%" 26 app:layout_widthPercent="50%" /> 27 28 <Button 29 android:id="@+id/button4" 30 android:layout_gravity="right|bottom" 31 android:text="Button 4" 32 app:layout_heightPercent="70%" 33 app:layout_widthPercent="50%" /> 34 35 36 </android.support.percent.PercentFrameLayout>
error: attribute layout_heightPercent not found
标签:schema utf-8 nbsp ram 一行代码 enc encoding support XML
原文地址:https://www.cnblogs.com/hbuwyg/p/11173649.html