Android TableLayout_列导致API级别错误<;24
应用程序在打开之前重新启动。我检查了我的java代码,没有问题。该应用程序在android 7以上版本中运行。这是我的UI的一部分Android TableLayout_列导致API级别错误<;24,android,android-layout,tablelayout,Android,Android Layout,Tablelayout,应用程序在打开之前重新启动。我检查了我的java代码,没有问题。该应用程序在android 7以上版本中运行。这是我的UI的一部分XML: <TableRow android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1"> <Button android:id="@+id/button_on"
XML
:
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
<Button
android:id="@+id/button_on"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="\u23FB"
android:background="@drawable/button_shape"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
android:backgroundTint="@color/colorButtonOpEnabled"
android:textColor="#fff"
android:layout_weight="1"
android:textSize="20sp"
android:layout_margin="2dp"
/>
<Button
android:id="@+id/button_clear"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="CE"
android:background="@drawable/button_shape"
android:backgroundTint="@color/colorButtonCEDisabled"
android:textColor="@color/colorButtonTextDisabled"
android:layout_weight="1"
android:textSize="20sp"
android:enabled="false"
android:layout_margin="2dp"/>
<Button
android:id="@+id/button_correct"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="CORRECT"
android:background="@drawable/button_shape"
android:backgroundTint="@color/colorButtonOpDisabled"
android:textColor="@color/colorButtonTextDisabled"
android:layout_column="3"
android:layout_span="2"
android:layout_weight="2"
android:textSize="20sp"
android:enabled="false"
android:layout_margin="2dp"/>
</TableRow>
这是应用程序的屏幕截图:
将实际空视图添加到第三列,而不是使用
android:layout\u column=“3”
将实际空视图添加到第三列,而不是使用android:layout\u column=“3”
将实际空视图添加到第三列是否有帮助,一切都会好起来的。这其实很简单。谢谢。我将其作为答案发布,供您标记为解决方案;-)如果您将实际的空视图添加到第三列,而不是使用android:layout\u column=“3”
,会有帮助吗?是的,会很好。这其实很简单。谢谢。我将其作为答案发布,供您标记为解决方案;-)
android:layout_column="3"