错误:(25)在程序包'android'中找不到属性'layout_columnWeight'的资源标识符。
我无法在xml中更新它。当我使用网格布局时出现了它。
<GridLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/textView"
android:layout_toEndOf="@+id/textView">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Button"
android:id="@+id/button"
android:layout_columnWeight="0"
/>
</GridLayout>
错误:(25)在包'android'中找不到属性'layout_columnWeight'的资源标识符...。我无法在xml中更新它。.当我使用网格布局时出现了它.. <...>
如果要通过GridLayout
属性使用columnWeight
,最好的方法是使用v7支持版本。
weight
。如果希望它受支持,则可能要使用支持库v7中的GridLayout。或切换到GridView。
尽管使用android:layout_columnWeight =“ 1”