我可以帮您进行翻译。这段内容的意思是:「我使用了一个样式文件来为相同的布局设置独特的样式。」
「样式:」
错误:(设计时间)
「样式:」
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- User form layout style -->
<style name="UserFormLayoutRow">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:orientation">horizontal</item>
<item name="android:paddingBottom">@dimen/padding_small</item>
</style>
</resources >
//在布局文件中
<LinearLayout
style="@style/UserFormLayoutRow" >
//contents
</LinearLayout>
错误:(设计时间)
运行时错误:
06-13 05:58:14.506: E/AndroidRuntime(936): Caused by: java.lang.RuntimeException: Binary XML file line #105: You must supply a layout_width attribute.
我错在哪里了?TIA
res\values
文件夹中定义了它,而没有在values-v11
和values-v14
文件夹中定义吗?根据这个问题,你可以尝试在这两个文件夹中也定义它们。 - Shobhit Puri