Android-ExpandableListView内容在屏幕底部被切断
我是Android新手,所以我可能只是在做一些愚蠢的事情,但我的桌子是这样的: 我以为只是底部导航条覆盖了内容,但当我在设备上测试时,底部导航条位于设备上,而不是屏幕上,我遇到了同样的问题。以下是我的XML:Android-ExpandableListView内容在屏幕底部被切断,android,xml,expandablelistview,android-constraintlayout,Android,Xml,Expandablelistview,Android Constraintlayout,我是Android新手,所以我可能只是在做一些愚蠢的事情,但我的桌子是这样的: 我以为只是底部导航条覆盖了内容,但当我在设备上测试时,底部导航条位于设备上,而不是屏幕上,我遇到了同样的问题。以下是我的XML: <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/re
<?xml version="1.0" encoding="utf-8"?>
<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="match_parent"
android:layout_height="match_parent"
tools:context=".TipActivity">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="?android:attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
app:layout_constraintTop_toTopOf="parent"/>
<ExpandableListView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/tip_list_view"
app:layout_constraintTop_toBottomOf="@id/toolbar">
</ExpandableListView>
</android.support.constraint.ConstraintLayout>
我发现了问题。通过将工具栏和ExpandableListView放置在垂直线性布局中,并保持其他所有内容不变,视图将正确匹配 您不应该在listview上设置底部约束吗?@tyczj当我添加“layout\u constriantbooth\u toBottomOf=“parent”时,问题仍然存在,然后内容显示在工具栏下方