我在ConstraintLayout中使用了TableLayout,它在Marshmallow和Nougat上完美运行但是当我在Lollipop中测试它时,应用程序会立即关闭,当我删除TableLayout时它会再次运行。
这是我的XML:
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.example.tis_dev.apppoint.Principal"
tools:showIn="@layout/app_bar_principal"
android:background="#F6F6F6"
tools:layout_editor_absoluteY="81dp"
tools:layout_editor_absoluteX="0dp">
<TableLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/tabla1"
android:textAlignment="center"
android:stretchColumns="2,6,8"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
tools:layout_constraintRight_creator="1"
tools:layout_constraintBottom_creator="1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
tools:layout_constraintLeft_creator="1"
android:layout_marginBottom="32dp"
app:layout_constraintLeft_toLeftOf="parent">
<!-- My TableRows here -->
</TableLayout>
</android.support.constraint.ConstraintLayout>
我正在使用Android Studio 2.3.2