我正在尝试在 Xamarin Studio 中实现一个简单的 GridLayout,如本示例中所述:
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:columnCount="4"
android:orientation="horizontal" >
<Button
android:layout_column="3"
android:text="/" />
<Button android:text="1" />
<Button android:text="2" />
<Button android:text="3" />
<Button android:text="*" />
<Button android:text="4" />
<Button android:text="5" />
<Button android:text="6" />
<Button android:text="-" />
<Button android:text="7" />
<Button android:text="8" />
<Button android:text="9" />
<Button
android:layout_gravity="fill"
android:layout_rowSpan="3"
android:text="+" />
<Button
android:layout_columnSpan="2"
android:layout_gravity="fill"
android:text="0" />
<Button android:text="00" />
<Button
android:layout_columnSpan="3"
android:layout_gravity="fill"
android:text="=" />
</GridLayout>
但它不会建立。我收到以下错误:
Error: No resource identifier found for attribute 'columnCount' in package 'android' (AndroidApplication1) Error: No resource identifier found for attribute 'layout_rowSpan' in package 'android' (AndroidApplication1) Error: No resource identifier found for attribute 'layout_columnSpan' in package 'android' (AndroidApplication1) Error: No resource identifier found for attribute 'layout_columnSpan' in package 'android' (AndroidApplication1)
我需要改变什么才能使这项工作?